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

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

tagging as initscripts-8.91.0

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
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
28echo "$PEERID" > /sys/bus/iucv/drivers/netiucv/connection 2>/dev/null
29
30ifconfig ${DEVICE} ${IPADDR} ${opts} pointopoint ${GATEWAY} netmask ${NETMASK}
31if [ "${NETWORK}" != "" ] ; then
32        route add -host ${GATEWAY} metric 1 ${DEVICE}
33fi
34
35
36if [ "${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
41fi
42
43/etc/sysconfig/network-scripts/ifup-post $1
Note: See TracBrowser for help on using the repository browser.