aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsysconfig/network-scripts/ifup-eth8
-rw-r--r--sysconfig/network-scripts/network-functions7
2 files changed, 10 insertions, 5 deletions
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index cbea96a2..2cf5d6d1 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -114,9 +114,7 @@ fi
# Bonding initialization. For DHCP, we need to enslave the devices early,
# so it can actually get an IP.
-if [ "$ISALIAS" = no ] && \
- { [ "${TYPE}" = "Bonding" ] \
- || ethtool -i $DEVICE 2>/dev/null | grep -q "driver: bonding"; } then
+if [ "$ISALIAS" = no ] && is_bonding_device ${DEVICE} ; then
/sbin/ip link set dev ${DEVICE} down
/sbin/ip link set dev ${DEVICE} up
[ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}
@@ -201,7 +199,7 @@ else
fi
[ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}
# Bonding initialization part II
- if [ "${TYPE}" = "Bonding" ] || ethtool -i $DEVICE 2>/dev/null| grep -q "driver: bonding" ; then
+ if is_bonding_device ${DEVICE} ; then
for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do
is_ignored_file "$device" && continue
/sbin/ifup ${device##*/}
@@ -278,7 +276,7 @@ fi
# Bonding initialization part II - for static, enslave the devices. For
# DHCP, remove any routes for the slaves.
-if [ "${TYPE}" = "Bonding" ] || ethtool -i $DEVICE 2>/dev/null| grep -q "driver: bonding" ; then
+if is_bonding_device ${DEVICE} ; then
for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do
is_ignored_file "$device" && continue
if [ "$BOOTPROTO" = "dhcp" ]; then
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index e60d704b..dacf1d22 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -380,6 +380,13 @@ is_wireless_device ()
return 1
}
+is_bonding_device ()
+{
+ [ "${TYPE}" = "Bonding" ] && return 0
+ ethtool -i $1 2>/dev/null | grep -q "driver: bonding" && return 0
+ return 1
+}
+
# Mainframe devices:
configure_ccwgroup_device ()
{