summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2006-01-11 17:34:24 +0000
committerChristian Heim <phreak@gentoo.org>2006-01-11 17:34:24 +0000
commitc2550355e10a1a15e60934b327b6683b65b28291 (patch)
treef659abeb2356909878851d2f11b237738c93e9fc /net-scripts
parentr1799 (diff)
downloadbaselayout-vserver-c2550355e10a1a15e60934b327b6683b65b28291.tar.gz
baselayout-vserver-c2550355e10a1a15e60934b327b6683b65b28291.tar.bz2
baselayout-vserver-c2550355e10a1a15e60934b327b6683b65b28291.zip
Merging r1802
svn path=/baselayout-vserver/trunk/; revision=204
Diffstat (limited to 'net-scripts')
-rwxr-xr-xnet-scripts/init.d/net.lo2
-rw-r--r--net-scripts/net.modules.d/bonding16
2 files changed, 12 insertions, 6 deletions
diff --git a/net-scripts/init.d/net.lo b/net-scripts/init.d/net.lo
index 47752cb..2a8ac84 100755
--- a/net-scripts/init.d/net.lo
+++ b/net-scripts/init.d/net.lo
@@ -12,7 +12,7 @@
# runlevel as the net.* script that needs it.
depend() {
need localmount
- use coldplug pcmcia usb isdn wlan
+ use pcmcia usb isdn wlan
# Load any custom depend functions for the given interface
# For example, br0 may need eth0 and eth1
diff --git a/net-scripts/net.modules.d/bonding b/net-scripts/net.modules.d/bonding
index a717ccb..3e629c8 100644
--- a/net-scripts/net.modules.d/bonding
+++ b/net-scripts/net.modules.d/bonding
@@ -40,6 +40,10 @@ bonding_pre_start() {
slaves="slaves_${ifvar}[@]"
[[ -z ${!slaves} ]] && return 0
+ slaves=( "${!slaves}" )
+
+ # Support space seperated slaves
+ [[ ${#slaves[@]} == 1 ]] && slaves=( ${slaves} )
interface_exists "${iface}" true || return 1
@@ -50,17 +54,17 @@ bonding_pre_start() {
ebegin "Adding slaves to ${iface}"
eindent
- einfo "${!slaves}"
+ einfo "${slaves[@]}"
# Check that our slaves exist
- for s in ${!slaves} ; do
+ for s in "${slaves[@]}" ; do
interface_exists "${s}" && continue
ewarn "interface ${s} does not exist"
return 1
done
# Must force the slaves to a particular state before adding them
- for s in ${!slaves} ; do
+ for s in "${slaves[@]}" ; do
interface_del_addresses "${s}"
interface_up "${s}"
done
@@ -70,7 +74,7 @@ bonding_pre_start() {
# finally add in slaves
eoutdent
- eval /sbin/ifenslave "${iface}" "${!slaves}" >/dev/null
+ eval /sbin/ifenslave "${iface}" "${slaves[@]}" >/dev/null
eend $?
return 0 #important
@@ -87,7 +91,9 @@ bonding_stop() {
! bonding_exists "${iface}" && return 0
# don't trust the config, get the active list instead
- slaves=$( sed -n -e 's/^Slave Interface: //p' "/proc/net/bonding/${iface}" )
+ slaves="$( \
+ sed -n -e 's/^Slave Interface: //p' /proc/net/bonding/${iface} | xargs \
+ )"
[[ -z ${slaves} ]] && return 0
# remove all slaves