Merge pull request #309 from justincormack/tapvsockvmbus

Use mobyplatform not vmbus for tap-vsock
This commit is contained in:
Rolf Neugebauer 2016-07-21 10:34:57 +01:00 committed by GitHub
commit 423b3c2765
2 changed files with 18 additions and 25 deletions

View File

@ -12,7 +12,7 @@ then
FUSE=$(ps -eo args | grep '^/sbin/transfused') FUSE=$(ps -eo args | grep '^/sbin/transfused')
[ $? -eq 0 ] && printf "✓ Process transfused running\n" || printf "✗ No transfused process\n" [ $? -eq 0 ] && printf "✓ Process transfused running\n" || printf "✗ No transfused process\n"
fi fi
if [ -d /sys/bus/vmbus ] if [ [ "$(mobyplatform)" = "windows" ] ]
then then
TAPVS=$(ps -eo args | grep '^/sbin/tap-vsockd') TAPVS=$(ps -eo args | grep '^/sbin/tap-vsockd')
[ $? -eq 0 ] && printf "✓ Process tap-vsockd running\n" || printf "✗ No tap-vsockd process\n" [ $? -eq 0 ] && printf "✓ Process tap-vsockd running\n" || printf "✗ No tap-vsockd process\n"

View File

@ -9,14 +9,11 @@ depend()
start() start()
{ {
if [ ! -d /sys/bus/vmbus ]; then [ "$(mobyplatform)" != "windows" ] && exit 0
# skip if not on Hyper-V
exit 0 mobyconfig exists network || exit 0
fi
if mobyconfig exists network
then
NETWORK_MODE="$(mobyconfig get network | tr -d '[[:space:]]')" NETWORK_MODE="$(mobyconfig get network | tr -d '[[:space:]]')"
if [ "${NETWORK_MODE}" = "hybrid" ]; then [ "${NETWORK_MODE}" = "hybrid" ] || exit 0
ebegin "Starting VPN proxy" ebegin "Starting VPN proxy"
@ -30,16 +27,12 @@ start()
--listen --listen
eend $? "Failed to start VPN proxy" eend $? "Failed to start VPN proxy"
fi
fi
} }
stop() stop()
{ {
if [ ! -d /sys/bus/vmbus ]; then [ "$(mobyplatform)" != "windows" ] && exit 0
# skip if not on Hyper-V
exit 0
fi
ebegin "Stopping VPN proxy" ebegin "Stopping VPN proxy"
PIDFILE=/var/run/tap-vsockd.pid PIDFILE=/var/run/tap-vsockd.pid