diff options
author | davidovski <david@davidovski.xyz> | 2022-06-15 20:02:02 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-06-15 20:02:02 +0100 |
commit | d2567bfbdf0e9fa6db0a6ed1534831ec859a3e03 (patch) | |
tree | 684a17eebf446aa1adab1097616f1882c8d51568 /repo/vde2/vde2.post-down | |
parent | d1fc3393cca72e8e432f827f7624e38734fad6dc (diff) |
added deps for qemu
Diffstat (limited to 'repo/vde2/vde2.post-down')
-rw-r--r-- | repo/vde2/vde2.post-down | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/repo/vde2/vde2.post-down b/repo/vde2/vde2.post-down new file mode 100644 index 0000000..be5f5b3 --- /dev/null +++ b/repo/vde2/vde2.post-down @@ -0,0 +1,37 @@ +#!/bin/sh + +VDE_SWITCH=/usr/bin/vde_switch +SLIRPVDE=/usr/bin/slirpvde + +# this is not an interesting stanza for us +if [ -z "$IF_VDE2_SWITCH" -a -z "$IF_VDE2_PLUG" -a -z "$IF_VDE2_SLIRP" ]; then + exit 0 +fi + +PIDFILE="/var/run/vde2/$IFACE-plug.pid" +CTLFILE="/var/run/vde2/$IFACE.ctl" +if [ -f $PIDFILE ]; then + start-stop-daemon --stop --quiet --pidfile $PIDFILE + rm -f $PIDFILE +fi + +PIDFILE="/var/run/vde2/$IFACE-slirp.pid" +if [ -f $PIDFILE ]; then + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --exec $SLIRPVDE + rm -f $PIDFILE +fi + +PIDFILE="/var/run/vde2/$IFACE.pid" +CTLDIR="/var/run/vde2/$IFACE.ctl" +if [ -f $PIDFILE ]; then + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --exec $VDE_SWITCH + rm -f $PIDFILE + + # set the tap interface to non-persistant, see #568363 + vde_tunctl -b -d $IFACE 1>/dev/null +fi + +rm -rf $CTLDIR +rm -f $CTLDIR.* |