40network/parse-ip-opts.sh: "local" can only be used in functions
parent
9cb8447c90
commit
edd3262efd
|
@ -38,12 +38,13 @@ fi
|
||||||
|
|
||||||
# Count ip= lines to decide whether we need bootdev= or not
|
# Count ip= lines to decide whether we need bootdev= or not
|
||||||
if [ -z "$NEEDBOOTDEV" ] ; then
|
if [ -z "$NEEDBOOTDEV" ] ; then
|
||||||
local count=0
|
count=0
|
||||||
for p in $(getargs ip=); do
|
for p in $(getargs ip=); do
|
||||||
count=$(( $count + 1 ))
|
count=$(( $count + 1 ))
|
||||||
done
|
done
|
||||||
[ $count -gt 1 ] && NEEDBOOTDEV=1
|
[ $count -gt 1 ] && NEEDBOOTDEV=1
|
||||||
fi
|
fi
|
||||||
|
unset count
|
||||||
|
|
||||||
# If needed, check if bootdev= contains anything usable
|
# If needed, check if bootdev= contains anything usable
|
||||||
if [ -n "$NEEDBOOTDEV" ] ; then
|
if [ -n "$NEEDBOOTDEV" ] ; then
|
||||||
|
|
Loading…
Reference in New Issue