aboutsummaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'init.d')
-rw-r--r--init.d/consolefont.in2
-rw-r--r--init.d/hwclock.in4
-rw-r--r--init.d/keymaps.in2
-rw-r--r--init.d/mixer.in4
-rw-r--r--init.d/modules.in2
-rw-r--r--init.d/moused.in2
-rw-r--r--init.d/net.lo.in22
-rw-r--r--init.d/network.in2
-rw-r--r--init.d/numlock.in2
-rw-r--r--init.d/rc-enabled.in4
-rw-r--r--init.d/termencoding.in2
-rw-r--r--init.d/urandom.in2
12 files changed, 25 insertions, 25 deletions
diff --git a/init.d/consolefont.in b/init.d/consolefont.in
index cd0c8de8..f83b0036 100644
--- a/init.d/consolefont.in
+++ b/init.d/consolefont.in
@@ -49,7 +49,7 @@ start()
retval=1
break
fi
- x=$(($x + 1))
+ : $(( x += 1 ))
done
eend $retval
diff --git a/init.d/hwclock.in b/init.d/hwclock.in
index b79ff7c9..cfb25ae1 100644
--- a/init.d/hwclock.in
+++ b/init.d/hwclock.in
@@ -85,7 +85,7 @@ start()
if [ -e /etc/adjtime ] && yesno $clock_adjfile; then
_hwclock --adjust $utc_cmd
- retval=$(($retval + $?))
+ : $(( retval += $? ))
fi
# If setting UTC, don't bother to run hwclock when first booting
@@ -99,7 +99,7 @@ start()
else
_hwclock --systz $utc_cmd $clock_args
fi
- retval=$(($retval + $?))
+ : $(( retval += $? ))
fi
eend $retval "Failed to set the system clock"
diff --git a/init.d/keymaps.in b/init.d/keymaps.in
index a7bb085e..1b96f493 100644
--- a/init.d/keymaps.in
+++ b/init.d/keymaps.in
@@ -47,7 +47,7 @@ start()
n=1
while [ $n -le $ttyn ]; do
kbd_mode $kmode -C $ttydev$n
- n=$(($n + 1))
+ : $(( n += 1 ))
done
eend 0
diff --git a/init.d/mixer.in b/init.d/mixer.in
index bb428865..a08aea13 100644
--- a/init.d/mixer.in
+++ b/init.d/mixer.in
@@ -21,7 +21,7 @@ restore()
mixer -f "$mixer" \
$(cat "/var/db/${mixer#/dev/}-state") >/dev/null
veend $?
- : $((retval += $?))
+ : $(( retval += $? ))
fi
done
}
@@ -40,7 +40,7 @@ stop()
vebegin "$mixer"
mixer -f "$mixer" -s >/var/db/"${mixer#/dev/}"-state
veend $?
- : $((retval += $?))
+ : $(( retval += $? ))
done
eoutdent
eend $retval
diff --git a/init.d/modules.in b/init.d/modules.in
index e6737634..72f14e76 100644
--- a/init.d/modules.in
+++ b/init.d/modules.in
@@ -57,7 +57,7 @@ start()
[ -z "$args" ] && eval args=\$module_${aa}_args
[ -z "$args" ] && eval args=\$module_${xx}_args
eval modprobe -q "$mpargs" "$x" "$args"
- eend $? "Failed to load $x" && cnt=$(($cnt + 1))
+ eend $? "Failed to load $x" && : $(( cnt += 1 ))
done
einfo "Autoloaded $cnt module(s)"
}
diff --git a/init.d/moused.in b/init.d/moused.in
index a41005ff..cdcf36ad 100644
--- a/init.d/moused.in
+++ b/init.d/moused.in
@@ -54,7 +54,7 @@ start()
local ttyv=
for ttyv in /dev/ttyv*; do
vidcontrol < "$ttyv" -m on
- : $((retval+= $?))
+ : $(( retval += $? ))
done
fi
diff --git a/init.d/net.lo.in b/init.d/net.lo.in
index 66e19456..d647f319 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
diff --git a/init.d/network.in b/init.d/network.in
index c9341291..1c70785d 100644
--- a/init.d/network.in
+++ b/init.d/network.in
@@ -287,7 +287,7 @@ start()
tentative || break
[ $r = 5 ] && vebegin "Waiting for tentative addresses"
sleep 1
- r=$(($r - 1))
+ : $(( r -= 1 ))
done
if [ $r != 5 ]; then
[ $r != 0 ]
diff --git a/init.d/numlock.in b/init.d/numlock.in
index c5b894a5..3cb8bee3 100644
--- a/init.d/numlock.in
+++ b/init.d/numlock.in
@@ -21,7 +21,7 @@ _setleds()
while [ $i -le $ttyn ]; do
setleds -D "$1"num < $dev$i || retval=1
- i=$(($i + 1))
+ : $(( i += 1 ))
done
return $retval
diff --git a/init.d/rc-enabled.in b/init.d/rc-enabled.in
index aff2a406..9ba73b0a 100644
--- a/init.d/rc-enabled.in
+++ b/init.d/rc-enabled.in
@@ -33,7 +33,7 @@ start()
# Good to go!
"$svc" start && started="$started $svc"
- : $((retval += $?))
+ : $(( retval += $? ))
done
service_set_value started "$started"
eend $retval "Some local rc services failed to start"
@@ -46,7 +46,7 @@ stop()
local svc= retval=0
for svc in $(rcorder $(service_get_value started) 2>/dev/null | sort -r); do
"$svc" stop
- : $((retval += $?))
+ : $(( retval += $? ))
done
eend $retval "Some local rc services failed to stop"
return 0
diff --git a/init.d/termencoding.in b/init.d/termencoding.in
index 68e49b75..edba715e 100644
--- a/init.d/termencoding.in
+++ b/init.d/termencoding.in
@@ -31,7 +31,7 @@ start()
n=1
while [ ${n} -le "$ttyn" ]; do
printf "\033%s" "$termencoding" >$ttydev$n
- n=$(($n + 1))
+ : $(( n += 1 ))
done
# Save the encoding for use immediately at boot
diff --git a/init.d/urandom.in b/init.d/urandom.in
index 8233f828..7fe5e590 100644
--- a/init.d/urandom.in
+++ b/init.d/urandom.in
@@ -16,7 +16,7 @@ save_seed()
local psz=1
if [ -e /proc/sys/kernel/random/poolsize ]; then
- psz=$(($(cat /proc/sys/kernel/random/poolsize) / 4096))
+ : $(( psz = $(cat /proc/sys/kernel/random/poolsize) / 4096 ))
fi
( # sub shell to prevent umask pollution