summaryrefslogtreecommitdiff
path: root/init.d/net.lo.in
diff options
context:
space:
mode:
Diffstat (limited to 'init.d/net.lo.in')
-rw-r--r--init.d/net.lo.in22
1 files changed, 11 insertions, 11 deletions
diff --git a/init.d/net.lo.in b/init.d/net.lo.in
index 66e1945..d647f31 100644
--- a/init.d/net.lo.in
+++ b/init.d/net.lo.in
@@ -115,7 +115,7 @@ _wait_for_carrier()
eend 0
return 0
fi
- timeout=$((${timeout} - 1))
+ : $(( timeout -= 1 ))
[ "${efunc}" = "einfon" ] && printf "."
done
@@ -144,9 +144,9 @@ _netmask2cidr()
local i= len=
local IFS=.
for i in $1; do
- while [ ${i} != "0" ]; do
- len=$((${len} + ${i} % 2))
- i=$((${i} >> 1))
+ while [ i -ne 0 ]; do
+ : $(( len += i % 2 ))
+ : $(( i >>= 1 ))
done
done
@@ -277,7 +277,7 @@ _gen_module_list()
echo "module_${i}_program_start='${PROGRAM_START}'" >> "${MODULESLIST}"
echo "module_${i}_program_stop='${PROGRAM_STOP}'" >> "${MODULESLIST}"
echo "module_${i}_provide='${PROVIDE}'" >> "${MODULESLIST}"
- i=$((${i} + 1))
+ : $(( i += 1 ))
done
echo "module_${i}=" >> "${MODULESLIST}"
)
@@ -304,7 +304,7 @@ _load_modules()
local i=-1 x= mod= f= provides=
while true; do
- i=$((${i} + 1))
+ : $(( i += 1 ))
eval mod=\$module_${i}
[ -z "${mod}" ] && break
[ -e "${MODULESDIR}/${mod}.sh" ] || continue
@@ -438,7 +438,7 @@ _load_config()
# so modules can influence it
for cmd; do
eval config_${config_index}="'${cmd}'"
- config_index=$((${config_index} + 1))
+ : $(( config_index += 1 ))
done
# Terminate the list
eval config_${config_index}=
@@ -446,7 +446,7 @@ _load_config()
config_index=0
for cmd in ${fallback}; do
eval fallback_${config_index}="'${cmd}'"
- config_index=$((${config_index} + 1))
+ : $(( config_index += 1 ))
done
# Terminate the list
eval fallback_${config_index}=
@@ -541,7 +541,7 @@ start()
if [ -n "${our_metric}" ]; then
metric=${our_metric}
elif [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ]; then
- metric=$((${metric} + $(_ifindex)))
+ : $(( metric += $(_ifindex) ))
fi
while true; do
@@ -581,11 +581,11 @@ start()
eindent
eval config_${config_index}=\$config
unset fallback_${config_index}
- config_index=$((${config_index} - 1))
+ : $(( config_index -= 1 ))
fi
fi
eoutdent
- config_index=$((${config_index} + 1))
+ : $(( config_index += 1 ))
done
if ! ${oneworked}; then