From eeba63f8d62db2d57686f645e610f4ceb6f78f7a Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 22 May 2016 12:12:01 +0100 Subject: [PATCH] tap-vsockd: only try to start on Hyper-V This avoids an unnecessary boot-up error on non-Hyper-V hosts. From review comments on #130 Signed-off-by: David Scott --- alpine/packages/tap-vsockd/etc/init.d/tap-vsockd | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/alpine/packages/tap-vsockd/etc/init.d/tap-vsockd b/alpine/packages/tap-vsockd/etc/init.d/tap-vsockd index 0e7fd6f44..0e15f1685 100755 --- a/alpine/packages/tap-vsockd/etc/init.d/tap-vsockd +++ b/alpine/packages/tap-vsockd/etc/init.d/tap-vsockd @@ -9,6 +9,10 @@ depend() start() { + if [ ! -d /sys/bus/vmbus ]; then + # skip if not on Hyper-V + exit 0 + fi if mobyconfig exists network then NETWORK_MODE="$(mobyconfig get network | tr -d '[[:space:]]')" @@ -32,6 +36,10 @@ start() stop() { + if [ ! -d /sys/bus/vmbus ]; then + # skip if not on Hyper-V + exit 0 + fi ebegin "Stopping VPN proxy" PIDFILE=/var/run/tap-vsockd.pid