Revision 1108,
1005 bytes
checked in by daisuke, 14 years ago
(diff) |
import initscripts-8.90.6 from internal cvs repository
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # |
---|
3 | # /etc/sysconfig/network-scripts/ifup-iucv |
---|
4 | # |
---|
5 | # the iucv network driver is a point-to-point driver on S/390 machines |
---|
6 | # |
---|
7 | # To get the iucv module to load automatically at boot, you will need to |
---|
8 | # add the following line to /etc/modprobe.conf: |
---|
9 | # |
---|
10 | # alias iucv0 netiucv |
---|
11 | # |
---|
12 | |
---|
13 | . /etc/sysconfig/network |
---|
14 | |
---|
15 | cd /etc/sysconfig/network-scripts |
---|
16 | . ./network-functions |
---|
17 | |
---|
18 | CONFIG=$1 |
---|
19 | [ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG |
---|
20 | source_config |
---|
21 | |
---|
22 | if [ "$2" = "boot" -a "${ONBOOT}" = "no" ] |
---|
23 | then |
---|
24 | exit |
---|
25 | fi |
---|
26 | [ -n "${MTU}" ] && opts="${opts} mtu ${MTU}" |
---|
27 | |
---|
28 | echo "$PEERID" > /sys/bus/iucv/drivers/netiucv/connection 2>/dev/null |
---|
29 | |
---|
30 | ifconfig ${DEVICE} ${IPADDR} ${opts} pointopoint ${GATEWAY} netmask ${NETMASK} |
---|
31 | if [ "${NETWORK}" != "" ] ; then |
---|
32 | route add -host ${GATEWAY} metric 1 ${DEVICE} |
---|
33 | fi |
---|
34 | |
---|
35 | |
---|
36 | if [ "${GATEWAY}" != "" ]; then |
---|
37 | if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then |
---|
38 | # set up default gateway |
---|
39 | route add default gw ${GATEWAY} ${METRIC:+metric $METRIC} |
---|
40 | fi |
---|
41 | fi |
---|
42 | |
---|
43 | /etc/sysconfig/network-scripts/ifup-post $1 |
---|
Note: See
TracBrowser
for help on using the repository browser.