Mercurial > hg > quicktun
view debian/static/etc/network/if-post-down.d/quicktun @ 51:d83d6bb647a2
Fixed tunnel destruction on Debian using iproute2
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Mon, 03 Jun 2013 01:01:22 +0200 |
parents | 51c6d2fc712f |
children |
line wrap: on
line source
#!/bin/sh test -n "${IF_QT_REMOTE_ADDRESS}" || exit 0 test -z "${IF_QT_NO_PRECREATE}" || exit 0 if [ -x /usr/sbin/openvpn ]; then /usr/sbin/openvpn --rmtun --dev "${IFACE}" elif [ -x /sbin/ip ] && /sbin/ip tuntap 2>&1 >/dev/null; then if [ -n "${IF_QT_TUN_MODE}" ] && [ "${IF_QT_TUN_MODE}" = "1" ]; then DEVTYPE="tun" else DEVTYPE="tap" fi /sbin/ip tuntap del dev "${IFACE}" mode "${DEVTYPE}" elif [ -x /usr/sbin/tunctl ]; then /usr/sbin/tunctl -d "${IFACE}" fi