diff options
-rw-r--r-- | initscripts.spec | 2 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-ctc | 2 | ||||
-rw-r--r-- | sysconfig/network-scripts/network-functions | 28 |
3 files changed, 31 insertions, 1 deletions
diff --git a/initscripts.spec b/initscripts.spec index eab8db80..f93e47d3 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -1,6 +1,6 @@ Summary: The inittab file and the /etc/init.d scripts. Name: initscripts -Version: 7.54 +Version: 7.55 License: GPL Group: System Environment/Base Release: 1 diff --git a/sysconfig/network-scripts/ifup-ctc b/sysconfig/network-scripts/ifup-ctc index 15860fed..b9b38196 100755 --- a/sysconfig/network-scripts/ifup-ctc +++ b/sysconfig/network-scripts/ifup-ctc @@ -23,6 +23,8 @@ then fi [ -n "${MTU}" ] && opts="${opts} mtu ${MTU}" +configure_ccwgroup_device + ifconfig ${DEVICE} ${IPADDR} ${opts} pointopoint ${REMIP} netmask ${NETMASK} # Wait for the device to come up - the chandev'ified ctc driver can take diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index b6817dfb..a7a8c91b 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -185,6 +185,9 @@ is_available () return 1 } echo "$HOTPLUG" > /proc/sys/kernel/hotplug + # if it is a mainframe ccwgroup device, configure it before + # trying to rename it: + configure_ccwgroup_device if [ -n "$HWADDR" ]; then local curdev=`ip -o link | awk -F ':' -vIGNORECASE=1 '/$HWADDR/ { print $2 }'` rename_device "$1" "$HWADDR" "$curdev" @@ -317,3 +320,28 @@ is_wireless_device () LC_ALL=C iwconfig $1 2>&1 | grep -q "no wireless extensions" || return 0 return 1 } + +# Mainframe devices: +configure_ccwgroup_device () +{ + local DIR SYSDIR + # SUBCHANNELS is only set on mainframe ccwgroup devices + [ -z "$SUBCHANNELS" ] && return + if [ "$TYPE" = "QETH" -o "$TYPE" = "HSI" ]; then + DIR="/sys/bus/ccwgroup/drivers/qeth" + elif + [ "$TYPE" = "CTC" -o "$TYPE" = "ESCON" ]; then + DIR="/sys/bus/ccwgroup/drivers/ctc" + elif + [ "$TYPE" = "LCS" ]; then + DIR="/sys/bus/ccwgroup/drivers/lcs" + else + return + fi + SYSDIR="$DIR/${SUBCHANNELS//,*/}" + [ ! -e $DIR/group ] && return + echo "$SUBCHANNELS" > $DIR/group + [ -n "$PORTNAME" -a -e $SYSDIR/portname ] && \ + echo "$PORTNAME" > $SYSDIR/portname + [ -e $SYSDIR/online ] && echo 1 > $SYSDIR/online +} |