aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-plip
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifup-plip')
-rwxr-xr-xsysconfig/network-scripts/ifup-plip12
1 files changed, 4 insertions, 8 deletions
diff --git a/sysconfig/network-scripts/ifup-plip b/sysconfig/network-scripts/ifup-plip
index 48bcc2ca..7f4f521e 100755
--- a/sysconfig/network-scripts/ifup-plip
+++ b/sysconfig/network-scripts/ifup-plip
@@ -11,14 +11,10 @@ then
exit
fi
-ifconfig ${DEVICE} ${IPADDR} pointopoint ${REMIP}
-route add -net ${NETWORK} netmask ${NETMASK} ${DEVICE}
-
-# this is broken! it's only here to keep compatibility with old RH systems
-if [ "${GATEWAY}" != "" -a "${GATEWAY}" != "none" ]
-then
- route add default gw ${GATEWAY} metric ${METRIC:-1} ${DEVICE}
-fi
+[ -z "$PREFIX" ] && eval $(/bin/ipcalc --prefix ${IPADDR} ${NETMASK})
+ip addr add ${IPADDR} peer ${REMIP}/${PREFIX} dev ${DEVICE}
+ip link set up dev ${DEVICE}
+ip route add ${NETWORK} dev ${DEVICE}
. /etc/sysconfig/network