diff options
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 |