diff options
Diffstat (limited to 'network-scripts/ifup-plip')
-rwxr-xr-x | network-scripts/ifup-plip | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/network-scripts/ifup-plip b/network-scripts/ifup-plip new file mode 100755 index 00000000..2cea68b4 --- /dev/null +++ b/network-scripts/ifup-plip @@ -0,0 +1,27 @@ +#!/bin/sh + +cd /etc/sysconfig/network-scripts +. ./network-functions + +CONFIG=$1 +source_config + +if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ]; then + exit +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 + +if [ "${GATEWAY}" != "" ]; then + if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then + # set up default gateway + ip route replace default ${METRIC:+metric $METRIC} via ${GATEWAY} + fi +fi + +/etc/sysconfig/network-scripts/ifup-post $1 |