aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2006-09-27 19:59:05 +0000
committerBill Nottingham <notting@redhat.com>2006-09-27 19:59:05 +0000
commit225f7786a51745535128be4925eced71b2fa94f1 (patch)
tree6b2b59d0b5de909cf417e133d59c7d42cbfa7116 /sysconfig
parentb3d12d60e2ef7e1795b8b1177c1d28208bc06acd (diff)
downloadinitscripts-225f7786a51745535128be4925eced71b2fa94f1.tar
initscripts-225f7786a51745535128be4925eced71b2fa94f1.tar.gz
initscripts-225f7786a51745535128be4925eced71b2fa94f1.tar.bz2
initscripts-225f7786a51745535128be4925eced71b2fa94f1.tar.xz
initscripts-225f7786a51745535128be4925eced71b2fa94f1.zip
move ccwgroup initialization to a udev rule (#199139, #199655, #169161)
Diffstat (limited to 'sysconfig')
-rwxr-xr-xsysconfig/network-scripts/ifup-ctc2
-rw-r--r--sysconfig/network-scripts/network-functions37
2 files changed, 6 insertions, 33 deletions
diff --git a/sysconfig/network-scripts/ifup-ctc b/sysconfig/network-scripts/ifup-ctc
index 8c0317b1..514c102b 100755
--- a/sysconfig/network-scripts/ifup-ctc
+++ b/sysconfig/network-scripts/ifup-ctc
@@ -25,8 +25,6 @@ then
fi
[ -n "${MTU}" ] && opts="${opts} mtu ${MTU}"
-configure_ccwgroup_device
-
ifconfig ${DEVICE} ${IPADDR} ${opts} pointopoint ${GATEWAY} 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 dacf1d22..5e1fa2a5 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -26,6 +26,12 @@ get_config_by_hwaddr ()
| LC_ALL=C sed -e "$__sed_discard_ignored_files"
}
+get_config_by_subchannel ()
+{
+ LANG=C grep -il "^[[:space:]]*SUBCHANNELS=${1}\([[:space:]#]\|$\|,\)" /etc/sysconfig/network-scripts/ifcfg-* \
+ | LC_ALL=C sed -e "$__sed_discard_ignored_files"
+}
+
get_device_by_hwaddr ()
{
LANG=C ip -o link | grep -v link/ieee802.11 | awk -F ': ' -vIGNORECASE=1 "/$1/ { print \$2 }"
@@ -227,9 +233,6 @@ END {
modprobe $1 > /dev/null 2>&1 || {
return 1
}
- # if it is a mainframe ccwgroup device, configure it before
- # trying to rename it:
- configure_ccwgroup_device
if [ -n "$HWADDR" ]; then
local curdev=`get_device_by_hwaddr "$HWADDR"`
if [ -z "$curdev" ]; then
@@ -387,34 +390,6 @@ is_bonding_device ()
return 1
}
-# Mainframe devices:
-configure_ccwgroup_device ()
-{
- local DIR SYSDIR
- # SUBCHANNELS is only set on mainframe ccwgroup devices
- [ -z "$SUBCHANNELS" -o -z "$NETTYPE" ] && return
- DIR="/sys/bus/ccwgroup/drivers/$NETTYPE"
- SYSDIR="$DIR/${SUBCHANNELS//,*/}"
- [ ! -e $DIR/group ] && return
- echo "$SUBCHANNELS" > $DIR/group
- if [ -n "$PORTNAME" ]; then
- if [ "$NETTYPE" = "lcs" ]; then
- [ -e $SYSDIR/portno ] && echo "$PORTNAME" > $SYSDIR/portno
- else
- [ -e $SYSDIR/portname ] && echo "$PORTNAME" > $SYSDIR/portname
- fi
- fi
- if [ "$NETTYPE" = "ctc" -a -n "$CTCPROT" ]; then
- echo "$CTCPROT" > $SYSDIR/protocol
- fi
- if [ -n "$OPTIONS" ]; then
- for i in $OPTIONS; do
- echo "${i//*=/}" > "$SYSDIR/${i//=*/}"
- done
- fi
- [ -e $SYSDIR/online ] && echo 1 > $SYSDIR/online
-}
-
# Invoke this when /etc/resolv.conf has changed:
change_resolv_conf ()
{