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 <fastijum@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
d7e48fe643
commit
9f5eb03e5e
@ -100,9 +100,9 @@ bonding_pre_start()
|
|||||||
if [ -n "${primary}" ]; then
|
if [ -n "${primary}" ]; then
|
||||||
echo "+${primary}" >/sys/class/net/"${IFACE}"/bonding/slaves
|
echo "+${primary}" >/sys/class/net/"${IFACE}"/bonding/slaves
|
||||||
echo "${primary}" >/sys/class/net/"${IFACE}"/bonding/primary
|
echo "${primary}" >/sys/class/net/"${IFACE}"/bonding/primary
|
||||||
slaves="${slaves/${primary}/}"
|
|
||||||
fi
|
fi
|
||||||
for s in ${slaves}; do
|
for s in ${slaves}; do
|
||||||
|
[ "${s}" = "${primary}" ] && continue
|
||||||
echo "+${s}" >/sys/class/net/"${IFACE}"/bonding/slaves
|
echo "+${s}" >/sys/class/net/"${IFACE}"/bonding/slaves
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user