diff options
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-x | sysconfig/network-scripts/ifdown-eth | 4 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth index 1d9e7151..99eb1a0a 100755 --- a/sysconfig/network-scripts/ifdown-eth +++ b/sysconfig/network-scripts/ifdown-eth @@ -135,7 +135,9 @@ if [ -n "${BRIDGE}" ] && [ -x /usr/sbin/brctl ]; then fi if [ "${TYPE}" = "Tap" ]; then - tunctl -d "${DEVICE}" >/dev/null + TUNMODE="mode tap" + [[ ${DEVICE} == tun* ]] && TUNMODE="mode tun" + ip tuntap del ${TUNMODE} dev ${DEVICE} >/dev/null fi # wait up to 5 seconds for device to actually come down... diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 50e0a37a..e76d4c24 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -64,14 +64,12 @@ if [ "${TYPE}" = "Bridge" ]; then done fi -# If the device is a tap device, create it with tunctl, if available. +# Create tap device. if [ "${TYPE}" = "Tap" ]; then - if [ ! -x /usr/sbin/tunctl ]; then - net_log $"Tap support not available: tunctl not found" - exit 1 - fi - [ -n "${OWNER}" ] && OWNER="-u ${OWNER}" - /usr/sbin/tunctl ${OWNER} -t ${DEVICE} > /dev/null + [ -n "${OWNER}" ] && OWNER="user ${OWNER}" + TUNMODE="mode tap" + [[ ${DEVICE} == tun* ]] && TUNMODE="mode tun" + ip tuntap add ${TUNMODE} ${OWNER} dev ${DEVICE} > /dev/null fi # now check the real state |