mirror of
https://github.com/topjohnwu/ndk-busybox.git
synced 2025-02-12 15:08:23 +00:00
udhcpc: tweak math shell style with the metric var
Some shells (like dash) are lame and omit the POSIX increment/decrement feature (because it is listed as optional). Tweak the shell script to work in all POSIX variants. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
39b8fb41c5
commit
9fed24c031
@ -29,7 +29,8 @@ case "$1" in
|
|||||||
metric=0
|
metric=0
|
||||||
for i in $router ; do
|
for i in $router ; do
|
||||||
echo "Adding router $i"
|
echo "Adding router $i"
|
||||||
route add default gw $i dev $interface metric $((metric++))
|
route add default gw $i dev $interface metric $metric
|
||||||
|
: $(( metric += 1 ))
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user