diff options
author | Bill Nottingham <notting@redhat.com> | 2008-04-01 13:04:12 -0400 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2008-07-07 16:40:58 -0400 |
commit | c0e42318dcca68d960ca1d7977af2979bc99b8aa (patch) | |
tree | b3738fa7d5d60b6311614d6c82daeeaa004fd68d | |
parent | 8b1672cd138cca0e60bccdc6317f5ad4dff16d4c (diff) | |
download | initscripts-c0e42318dcca68d960ca1d7977af2979bc99b8aa.tar initscripts-c0e42318dcca68d960ca1d7977af2979bc99b8aa.tar.gz initscripts-c0e42318dcca68d960ca1d7977af2979bc99b8aa.tar.bz2 initscripts-c0e42318dcca68d960ca1d7977af2979bc99b8aa.tar.xz initscripts-c0e42318dcca68d960ca1d7977af2979bc99b8aa.zip |
don't attempt to re-enslave already-enslaved devices (#440077)
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 774f320c..cce0cd25 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -105,9 +105,10 @@ fi # slave device? if [ "${SLAVE}" = yes -a "${ISALIAS}" = no -a "${MASTER}" != "" ]; then - /sbin/ip link set dev ${DEVICE} down - echo "+${DEVICE}" > /sys/class/net/${MASTER}/bonding/slaves 2>/dev/null - + grep -wq "${DEVICE}" /sys/class/net/${MASTER}/bonding/slaves || { + /sbin/ip link set dev ${DEVICE} down + echo "+${DEVICE}" > /sys/class/net/${MASTER}/bonding/slaves 2>/dev/null + } if [ -n "$ETHTOOL_OPTS" ] ; then /sbin/ethtool -s ${REALDEVICE} $ETHTOOL_OPTS fi |