Use command -v rather than hash to detect commands (command is Posix and works

on OpenBSD).
This commit is contained in:
David Given 2016-11-26 12:53:36 +01:00
parent a596973f28
commit 2dc083f436

View file

@ -15,7 +15,7 @@ trap "rm -f $pidfile" EXIT
case $method in
qemu-system-*)
if ! hash $method 2>/dev/null; then
if ! command -v $method 2>/dev/null; then
echo "Warning: $method not installed, skipping test"
exit 0
fi
@ -33,7 +33,7 @@ case $method in
;;
qemu-*)
if ! hash $method 2>/dev/null; then
if ! command -v $method 2>/dev/null; then
echo "Warning: $method not installed, skipping test"
exit 0
fi