diff --git a/.checkpackageignore b/.checkpackageignore index 4faa3a8b8f..dbff352d3b 100644 --- a/.checkpackageignore +++ b/.checkpackageignore @@ -93,7 +93,6 @@ package/libftdi/0002-libftdi.pc-requires-libusb-fix-static-build.patch Sob package/libiio/S99iiod Shellcheck Variables package/libmad/0001-mips-h-constraint-removal.patch Sob package/lighttpd/S50lighttpd EmptyLastLine Indent Shellcheck Variables -package/linux-tools/S10hyperv Variables package/linuxptp/S65ptp4l Indent Shellcheck package/linuxptp/S66phc2sys Indent Shellcheck package/lirc-tools/S25lircd Indent Variables diff --git a/package/linux-tools/S10hyperv b/package/linux-tools/S10hyperv index 32887d1b6c..be9ed2c5df 100644 --- a/package/linux-tools/S10hyperv +++ b/package/linux-tools/S10hyperv @@ -2,14 +2,18 @@ PROGS="@PROGS@" PIDDIR="/var/run" +DAEMON="hyperv" # shellcheck source=/dev/null -[ -r "/etc/default/hyperv" ] && . "/etc/default/hyperv" +[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON" + +# only continue if we are in a HyperV platform +[ -e "/sys/bus/vmbus" ] || exit 0 start_one() { printf 'Starting %s: ' "$1" # shellcheck disable=SC2086 # we need the word splitting - start-stop-daemon -b -m -S -q -p "$PIDDIR/$1.pid" -x "/sbin/$1" -- -n + start-stop-daemon -b -m -S -q -p "$PIDDIR/$1.pid" -x "/usr/sbin/$1" -- -n status=$? if [ "$status" -eq 0 ]; then echo "OK"