aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r--sysconfig/network-scripts/network-functions37
1 files changed, 6 insertions, 31 deletions
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 ()
{