source: projects/initscripts/tags/initscripts-8.91.0/sysconfig/network-scripts/ifup-escon @ 2576

Revision 2576, 1.2 KB checked in by daisuke, 13 years ago (diff)

tagging as initscripts-8.91.0

Line 
1#!/bin/bash
2#
3# /etc/sysconfig/network-scripts/ifup-escon
4#
5# the escon network interface is a point-to-point interface on S/390 machines
6# which uses the ctc module.
7#
8# To get the ctc module to load automatically at boot, you will need to
9# add the following line to /etc/modules.conf:
10#
11# alias escon0 ctc
12#
13PATH=/sbin:/usr/sbin:/bin:/usr/bin
14
15cd /etc/sysconfig/network-scripts
16. /etc/sysconfig/network-scripts/network-functions
17
18CONFIG=$1
19[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
20source_config
21
22if [ "$2" = "boot" -a "${ONBOOT}" = "no" ]
23then
24        exit
25fi
26[ -n "${MTU}" ] && opts="${opts} mtu ${MTU}"
27
28ifconfig ${DEVICE} ${IPADDR} ${opts} pointopoint ${REMIP} netmask ${NETMASK}
29
30# Wait for the device to come up - the chandev'ified ctc driver can take
31# quite a while...
32timeout=0
33while ! ping -w 30 -c 1 ${REMIP} &>/dev/null; do
34        timeout=$(($timeout + 1))
35        if [ $timeout = 20 ]; then
36                echo $"ERROR: ${DEVICE} did not come up!"
37                break
38        fi
39done
40
41if [ "${NETWORK}" != "" ] ; then
42        route add -host ${REMIP} metric 1 ${DEVICE}
43fi
44
45. /etc/sysconfig/network
46
47if [ "${GATEWAY}" != "" ]; then
48        if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then
49                # set up default gateway
50                route add default gw ${GATEWAY}
51        fi
52fi
53
54/etc/sysconfig/network-scripts/ifup-post $1
Note: See TracBrowser for help on using the repository browser.