aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorKarsten Hopp <karsten@redhat.com>2004-05-18 12:30:49 +0000
committerKarsten Hopp <karsten@redhat.com>2004-05-18 12:30:49 +0000
commit002ed645baad470e826bb7206d2d48800c1263f9 (patch)
tree812bb5448380a208324e07f18d292bacbfe1f0d4 /sysconfig
parent92ab34a67efdd4a805a7f98753f5479fedd661f5 (diff)
downloadinitscripts-002ed645baad470e826bb7206d2d48800c1263f9.tar
initscripts-002ed645baad470e826bb7206d2d48800c1263f9.tar.gz
initscripts-002ed645baad470e826bb7206d2d48800c1263f9.tar.bz2
initscripts-002ed645baad470e826bb7206d2d48800c1263f9.tar.xz
initscripts-002ed645baad470e826bb7206d2d48800c1263f9.zip
- add support for mainframe ccwgroup devices (QETH/HSI/CTC/LCS)
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
+}