mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-27 20:48:11 +00:00
Use mobyplatform not vmbus for tap-vsock
Plus cleanup for less indentation. No functional change. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
996cab9f17
commit
c475121074
@ -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"
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user