diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2013-04-09 12:33:28 +0200 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2013-04-09 12:33:28 +0200 |
commit | c82961615e76578f289516262846f41bc7641db0 (patch) | |
tree | d467f1a4763d6ef84edf9ba4bae6fac337df0e27 /sysconfig/network-scripts/ifup-eth | |
parent | 37c54313cdc16da566592c5e86b91f9a13009dda (diff) | |
download | initscripts-c82961615e76578f289516262846f41bc7641db0.tar initscripts-c82961615e76578f289516262846f41bc7641db0.tar.gz initscripts-c82961615e76578f289516262846f41bc7641db0.tar.bz2 initscripts-c82961615e76578f289516262846f41bc7641db0.tar.xz initscripts-c82961615e76578f289516262846f41bc7641db0.zip |
replace tunctl with ip tuntap (#947875)
Diffstat (limited to 'sysconfig/network-scripts/ifup-eth')
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 12 |
1 files changed, 5 insertions, 7 deletions
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 |