init-ifupdown: make sure the exit value of the script is 0

Rework the conditional expression so the overall return value of the
script is not failure, because in that case the 'ifup' command fails
with:

run-parts: /etc/network/if-up.d/ifup exited with code 1

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2014-04-04 10:18:20 +02:00
parent be88589716
commit be2bf5df10
1 changed files with 3 additions and 1 deletions

View File

@ -30,4 +30,6 @@ eth1: | *:sms)
macaddr="$(sed -ne 's,^.*ethaddr3=\([^[:blank:]]\+\)[:blank:]*.*,\1,g;T;p' /proc/cmdline)"
esac
[ -n "${macaddr}" ] && ifconfig ${IFACE} hw ether ${macaddr} up
if [ -n "${macaddr}" ]; then
ifconfig ${IFACE} hw ether ${macaddr} up
fi