source: projects/initscripts/tags/initscripts-8.91.3/src/ccw_init @ 1108

Revision 1108, 1018 bytes checked in by daisuke, 14 years ago (diff)

import initscripts-8.90.6 from internal cvs repository

Line 
1#!/bin/bash
2
3[ -z "$DEVPATH" ] && exit 0
4[ "$SUBSYSTEM" != "ccw" ] && exit 0
5
6NOLOCALE="yes"
7
8. /etc/sysconfig/network-scripts/network-functions
9
10# First, determine our channel
11
12CHANNEL=${DEVPATH##*/}
13
14CONFIG=$(get_config_by_subchannel $CHANNEL)
15
16if [ -n "$CONFIG" ]; then
17        cd /etc/sysconfig/network-scripts
18        source_config
19fi
20
21# SUBCHANNELS is only set on mainframe ccwgroup devices
22[ -z "$SUBCHANNELS" -o -z "$NETTYPE" ] && exit 0
23DIR="/sys/bus/ccwgroup/drivers/$NETTYPE"
24SYSDIR="$DIR/${SUBCHANNELS//,*/}"
25[ ! -e $DIR/group ] && exit 0
26echo "$SUBCHANNELS" > $DIR/group
27if [ -n "$PORTNAME" ]; then
28        if [ "$NETTYPE" = "lcs" ]; then
29                [ -e $SYSDIR/portno ] && echo "$PORTNAME" > $SYSDIR/portno
30        else
31                [ -e $SYSDIR/portname ] && echo "$PORTNAME" > $SYSDIR/portname
32        fi
33fi
34if [ "$NETTYPE" = "ctc" -a -n "$CTCPROT" ]; then
35        echo "$CTCPROT" > $SYSDIR/protocol
36fi
37if [ -n "$OPTIONS" ]; then
38         
39        for i in $OPTIONS; do
40                echo "${i//*=/}" > "$SYSDIR/${i//=*/}"
41        done
42fi
43[ -e $SYSDIR/online ] && echo 1 > $SYSDIR/online
Note: See TracBrowser for help on using the repository browser.