aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh')
-rw-r--r--sh/functions.sh.in4
-rw-r--r--sh/rc-mount.sh2
-rwxr-xr-xsh/runtests.sh6
3 files changed, 6 insertions, 6 deletions
diff --git a/sh/functions.sh.in b/sh/functions.sh.in
index 1d1b0cd0..b00ec68e 100644
--- a/sh/functions.sh.in
+++ b/sh/functions.sh.in
@@ -8,14 +8,14 @@ RC_GOT_FUNCTIONS="yes"
eindent()
{
- EINFO_INDENT=$((${EINFO_INDENT:-0} + 2))
+ : $(( EINFO_INDENT = ${EINFO_INDENT:-0} + 2 ))
[ "$EINFO_INDENT" -gt 40 ] && EINFO_INDENT=40
export EINFO_INDENT
}
eoutdent()
{
- EINFO_INDENT=$((${EINFO_INDENT:-0} - 2))
+ : $(( EINFO_INDENT = ${EINFO_INDENT:-0} - 2 ))
[ "$EINFO_INDENT" -lt 0 ] && EINFO_INDENT=0
return 0
}
diff --git a/sh/rc-mount.sh b/sh/rc-mount.sh
index b3c9bf63..2bb14504 100644
--- a/sh/rc-mount.sh
+++ b/sh/rc-mount.sh
@@ -59,7 +59,7 @@ do_unmount()
eend 1
else
local sig="TERM"
- retry=$(($retry - 1))
+ : $(( retry -= 1 ))
[ $retry = 1 ] && sig="KILL"
fuser $f_kill$sig -k $f_opts \
"$mnt" >/dev/null 2>&1
diff --git a/sh/runtests.sh b/sh/runtests.sh
index 7f7e7bdd..f083ff46 100755
--- a/sh/runtests.sh
+++ b/sh/runtests.sh
@@ -9,17 +9,17 @@ tret=0
ebegin "Testing yesno()"
for f in yes YES Yes true TRUE True 1 ; do
if ! yesno $f; then
- tret=$(($tret + 1))
+ : $(( tret += 1 ))
echo "!$f!"
fi
done
for f in no NO No false FALSE False 0 ; do
if yesno $f; then
- tret=$(($tret + 1))
+ : $(( tret += 1 ))
echo "!$f!"
fi
done
eend $tret
-ret=$(($ret + $tret))
+: $(( ret += $tret ))
exit $ret