From cbf66c5f0604709d36186b36618335044bf91346 Mon Sep 17 00:00:00 2001 From: Cong Wang Date: Tue, 29 May 2012 17:00:33 +0800 Subject: [PATCH] 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 --- modules.d/40network/ifup.sh | 2 +- modules.d/40network/module-setup.sh | 2 +- modules.d/40network/parse-bond.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh index c03838f..1aaa1a8 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 f28286c..da58521 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 5822685..933ad27 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 -- 2.7.4