aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig')
-rwxr-xr-xsysconfig/network-scripts/ifup-ctc2
-rw-r--r--sysconfig/network-scripts/network-functions28
2 files changed, 30 insertions, 0 deletions
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
+}