mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-08-03 16:00:36 +00:00
Merge pull request #147 from djs55/error-on-startup
tap-vsockd: only try to start on Hyper-V
This commit is contained in:
commit
f5aa6fe66a
@ -9,6 +9,10 @@ depend()
|
|||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
|
if [ ! -d /sys/bus/vmbus ]; then
|
||||||
|
# skip if not on Hyper-V
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
if mobyconfig exists network
|
if mobyconfig exists network
|
||||||
then
|
then
|
||||||
NETWORK_MODE="$(mobyconfig get network | tr -d '[[:space:]]')"
|
NETWORK_MODE="$(mobyconfig get network | tr -d '[[:space:]]')"
|
||||||
@ -32,6 +36,10 @@ start()
|
|||||||
|
|
||||||
stop()
|
stop()
|
||||||
{
|
{
|
||||||
|
if [ ! -d /sys/bus/vmbus ]; then
|
||||||
|
# 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