From 9f5eb03e5ef30f4357d05e004f38ea6ca0d21346 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 18 Mar 2011 14:24:18 -0400 Subject: [PATCH] net: bonding: avoid using bash string replace X-Gentoo-Bug: 359311 X-Gentoo-Bug-URL: http://bugs.gentoo.org/359311 Reported-by: Raffaello D. Di Napoli Signed-off-by: Mike Frysinger --- net/bonding.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bonding.sh b/net/bonding.sh index 209d4f07..6d15f0da 100644 --- a/net/bonding.sh +++ b/net/bonding.sh @@ -100,9 +100,9 @@ bonding_pre_start() if [ -n "${primary}" ]; then echo "+${primary}" >/sys/class/net/"${IFACE}"/bonding/slaves echo "${primary}" >/sys/class/net/"${IFACE}"/bonding/primary - slaves="${slaves/${primary}/}" fi for s in ${slaves}; do + [ "${s}" = "${primary}" ] && continue echo "+${s}" >/sys/class/net/"${IFACE}"/bonding/slaves done else