| 4 |
- |
1 |
#!/bin/sh
|
|
|
2 |
|
|
|
3 |
cd /etc/sysconfig/network-scripts
|
|
|
4 |
. ./network-functions
|
|
|
5 |
|
|
|
6 |
CONFIG=$1
|
|
|
7 |
source_config
|
|
|
8 |
|
|
|
9 |
if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ]
|
|
|
10 |
then
|
|
|
11 |
exit
|
|
|
12 |
fi
|
|
|
13 |
|
|
|
14 |
ifconfig ${DEVICE} ${IPADDR} pointopoint ${REMIP}
|
|
|
15 |
route add -net ${NETWORK} netmask ${NETMASK} ${DEVICE}
|
|
|
16 |
|
|
|
17 |
# this is broken! it's only here to keep compatibility with old RH systems
|
|
|
18 |
if [ "${GATEWAY}" != "" -a "${GATEWAY}" != "none" ]
|
|
|
19 |
then
|
|
|
20 |
route add default gw ${GATEWAY} metric ${METRIC:-1} ${DEVICE}
|
|
|
21 |
fi
|
|
|
22 |
|
|
|
23 |
. /etc/sysconfig/network
|
|
|
24 |
|
|
|
25 |
if [ "${GATEWAY}" != "" ]; then
|
|
|
26 |
if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then
|
|
|
27 |
# set up default gateway
|
|
|
28 |
route add default gw ${GATEWAY} ${METRIC:+metric $METRIC}
|
|
|
29 |
fi
|
|
|
30 |
fi
|
|
|
31 |
|
|
|
32 |
/etc/sysconfig/network-scripts/ifup-post $1
|