projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39b8fb4
)
udhcpc: tweak math shell style with the metric var
author
Mike Frysinger
<vapier@gentoo.org>
Wed, 27 Feb 2013 06:05:34 +0000
(
01:05
-0500)
committer
Mike Frysinger
<vapier@gentoo.org>
Wed, 27 Feb 2013 06:05:34 +0000
(
01:05
-0500)
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>
examples/udhcp/simple.script
patch
|
blob
|
history
diff --git
a/examples/udhcp/simple.script
b/examples/udhcp/simple.script
index d42f2d3d5bcefc5d4a3ae670db2544f572fcc676..0397e506c60a8db1b7e9b41695866e1a29d9cfdd 100755
(executable)
--- a/
examples/udhcp/simple.script
+++ b/
examples/udhcp/simple.script
@@
-29,7
+29,8
@@
case "$1" in
metric=0
for i in $router ; do
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
fi