From 9a45bd97790ebfdb5ceb137b013c40943b996055 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 1 Apr 2008 13:04:12 -0400 Subject: don't attempt to re-enslave already-enslaved devices (#440077) --- sysconfig/network-scripts/ifup-eth | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 3e2c1d47..c5d03576 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -117,9 +117,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 -- cgit v1.2.1 From 4e13324684839d4dfbe97ff2b7023d07ac6dc4a5 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 1 Apr 2008 13:08:42 -0400 Subject: Run as a NetworkManagerDispatcher script (#439242) --- NetworkManager/dispatcher.d/05-netfs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 NetworkManager/dispatcher.d/05-netfs diff --git a/NetworkManager/dispatcher.d/05-netfs b/NetworkManager/dispatcher.d/05-netfs new file mode 100755 index 00000000..b3ba12c7 --- /dev/null +++ b/NetworkManager/dispatcher.d/05-netfs @@ -0,0 +1,17 @@ +#!/bin/sh + +export LC_ALL=C + +if [ "$2" = "down" ]; then + ip route ls | grep -q ^default || { + [ -f /var/lock/subsys/netfs ] && /etc/rc.d/init.d/netfs stop + } +fi + +if [ "$2" = "up" ]; then + defdev=$(ip route ls | awk '/^default/ { print $NF }') + if [ "$defdev" = "$1" ]; then + /sbin/chkconfig netfs && /etc/rc.d/init.d/netfs start + fi +fi + -- cgit v1.2.1 From e3a871a31826536fa3cb52b70fed1e7e4b9c6c30 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 1 Apr 2008 13:25:36 -0400 Subject: Remove $local_fs from the list of provides. The concept of local filesystems on top of remote network filesystems is bizarre enough that it's almost certainly not necessary for 'system' things. Removing the $local_fs provide (making it implicitly provided, like $time) simplifies some of the dependency issues. --- rc.d/init.d/netfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs index cfe9264c..6769c132 100755 --- a/rc.d/init.d/netfs +++ b/rc.d/init.d/netfs @@ -10,7 +10,7 @@ # description: Mounts and unmounts all Network File System (NFS), \ # SMB/CIFS (Lan Manager/Windows), and NCP (NetWare) mount points. ### BEGIN INIT INFO -# Provides: $local_fs $remote_fs +# Provides: $remote_fs ### END INIT INFO [ -f /etc/sysconfig/network ] || exit 0 -- cgit v1.2.1