Revision 2573,
756 bytes
checked in by daisuke, 14 years ago
(diff) |
fix bash3ism
- bash4's source (or .) command does not search current directory any longer.
|
Rev | Line | |
---|
[1108] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | cd /etc/sysconfig/network-scripts |
---|
[2573] | 4 | . /etc/sysconfig/network-scripts/network-functions |
---|
[1108] | 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 |
---|
Note: See
TracBrowser
for help on using the repository browser.