From: Cong Wang Date: Tue, 29 May 2012 09:00:33 +0000 (+0800) Subject: Do not use ifenslave X-Git-Tag: 019~32 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cbf66c5f0604709d36186b36618335044bf91346;p=thirdparty%2Fdracut.git Do not use ifenslave ifenslave is an old tool, and could be dropped, we can use the /sys interface. Cc: Harald Hoyer Cc: Dave Young Cc: Vivek Goyal Signed-off-by: Cong Wang --- diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh index c03838f44..1aaa1a816 100755 --- a/modules.d/40network/ifup.sh +++ b/modules.d/40network/ifup.sh @@ -156,7 +156,7 @@ if [ -e /tmp/bond.info ]; then for slave in $bondslaves ; do ip link set $slave down - ifenslave $bondname $slave + echo "+$slave" > /sys/class/net/$bondname/bonding/slaves ip link set $slave up wait_for_if_up $slave done diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh index f28286cae..da585219c 100755 --- a/modules.d/40network/module-setup.sh +++ b/modules.d/40network/module-setup.sh @@ -75,7 +75,7 @@ installkernel() { install() { local _arch _i _dir dracut_install ip arping tr dhclient - dracut_install -o brctl ifenslave + dracut_install -o brctl inst "$moddir/ifup.sh" "/sbin/ifup" inst "$moddir/netroot.sh" "/sbin/netroot" inst "$moddir/dhclient-script.sh" "/sbin/dhclient-script" diff --git a/modules.d/40network/parse-bond.sh b/modules.d/40network/parse-bond.sh index 582268529..933ad27a8 100755 --- a/modules.d/40network/parse-bond.sh +++ b/modules.d/40network/parse-bond.sh @@ -15,7 +15,7 @@ # Check if bond parameter is valid if getarg bond= >/dev/null ; then - command -v ifenslave >/dev/null 2>&1 || die "No 'ifenslave' installed" + : fi # We translate list of slaves to space-separated here to mwke it easier to loop over them in ifup