From 6f6830b700f33172e33db32f12e9bfef3a7f7989 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 6 Jan 2012 17:38:26 -0500 Subject: Remove ifconfig usage from assorted ancient device types. --- sysconfig/network-scripts/ifup-ctc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sysconfig/network-scripts/ifup-ctc') diff --git a/sysconfig/network-scripts/ifup-ctc b/sysconfig/network-scripts/ifup-ctc index e268d7cc..1a1aec5d 100755 --- a/sysconfig/network-scripts/ifup-ctc +++ b/sysconfig/network-scripts/ifup-ctc @@ -23,10 +23,11 @@ if [ "$2" = "boot" -a "${ONBOOT}" = "no" ] then exit fi -[ -n "${MTU}" ] && opts="${opts} mtu ${MTU}" - -ifconfig ${DEVICE} ${IPADDR} ${opts} pointopoint ${GATEWAY} netmask ${NETMASK} +[ -n "${MTU}" ] && ip link set dev ${DEVICE} mtu ${MTU} +[ -z "$PREFIX" ] && eval $(/bin/ipcalc --prefix ${IPADDR} ${NETMASK}) +ip addr add ${IPADDR} peer ${GATEWAY}/${PREFIX} dev ${DEVICE} +ip link set up dev ${DEVICE} # Wait for the device to come up - the chandev'ified ctc driver can take # quite a while... timeout=0 -- cgit v1.2.1