diff options
author | Bill Nottingham <notting@redhat.com> | 2012-01-06 17:38:26 -0500 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2012-01-06 17:38:26 -0500 |
commit | 6f6830b700f33172e33db32f12e9bfef3a7f7989 (patch) | |
tree | ab1c142ba6c6bc201c10846b7d8ed54ef9aff3bf /sysconfig/network-scripts/ifup-plusb | |
parent | b5a510d2558d333624dac456790d667e3e7f0570 (diff) | |
download | initscripts-6f6830b700f33172e33db32f12e9bfef3a7f7989.tar initscripts-6f6830b700f33172e33db32f12e9bfef3a7f7989.tar.gz initscripts-6f6830b700f33172e33db32f12e9bfef3a7f7989.tar.bz2 initscripts-6f6830b700f33172e33db32f12e9bfef3a7f7989.tar.xz initscripts-6f6830b700f33172e33db32f12e9bfef3a7f7989.zip |
Remove ifconfig usage from assorted ancient device types.
Diffstat (limited to 'sysconfig/network-scripts/ifup-plusb')
-rwxr-xr-x | sysconfig/network-scripts/ifup-plusb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifup-plusb b/sysconfig/network-scripts/ifup-plusb index e185e647..7f8f4649 100755 --- a/sysconfig/network-scripts/ifup-plusb +++ b/sysconfig/network-scripts/ifup-plusb @@ -22,12 +22,14 @@ then exit fi +[ -z "$PREFIX" ] && eval $(/bin/ipcalc --prefix ${IPADDR} ${NETMASK}) + if [ ${BROADCAST} != "" ] ; then - ifconfig ${DEVICE} ${IPADDR} pointopoint ${REMIP} netmask ${NETMASK} -broadcast ${BROADCAST} + ip addr add ${IPADDR} peer ${REMIP}/${PREFIX} broadcast ${BROADCAST} dev ${DEVICE} else - ifconfig ${DEVICE} ${IPADDR} pointopoint ${REMIP} netmask ${NETMASK} + ip addr add ${IPADDR} peer ${REMIP}/${PREFIX} dev ${DEVICE} fi +ip link set up dev ${DEVICE} . /etc/sysconfig/network |