]>
Commit | Line | Data |
---|---|---|
12de71be | 1 | #!/bin/sh |
7742e157 AF |
2 | PATH=/sbin:/usr/sbin:/bin:/usr/bin |
3 | ||
12de71be | 4 | cd /etc/sysconfig/network-scripts |
7e04fe0e | 5 | . /etc/rc.d/init.d/functions.network |
12de71be | 6 | |
7 | CONFIG=$1 | |
7742e157 AF |
8 | source_config |
9 | ||
10 | if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ] | |
11 | then | |
12 | exit | |
13 | fi | |
14 | ||
15 | ifconfig ${DEVICE} ${IPADDR} pointopoint ${REMIP} | |
80fd83b6 AM |
16 | #route add -net ${NETWORK} netmask ${NETMASK} ${DEVICE} |
17 | ip route add ${NETWORK}/${PREFIX} dev ${DEVICE} | |
7742e157 AF |
18 | |
19 | # this is broken! it's only here to keep compatibility with old RH sytstems | |
20 | if [ "${GATEWAY}" != "" -a "${GATEWAY}" != "none" ] | |
21 | then | |
22 | route add default gw ${GATEWAY} metric 1 ${DEVICE} | |
23 | fi | |
24 | ||
25 | . /etc/sysconfig/network | |
26 | ||
27 | if [ "${GATEWAY}" != "" ]; then | |
28 | if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then | |
29 | # set up default gateway | |
62c4265e | 30 | ip route add default via ${GATEWAY} |
7742e157 AF |
31 | fi |
32 | fi | |
33 | ||
34 | /etc/sysconfig/network-scripts/ifup-post $1 |