mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 10:25:37 +03:00
treewide: fix unnecessary $ on arithmetic variables
This should fix shellcheck warning SC2004.
This commit is contained in:
parent
27d45db38c
commit
e873a9f18a
@ -139,7 +139,7 @@ _busctl() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
n=$(($COMP_CWORD - $i))
|
n=$((COMP_CWORD - i))
|
||||||
|
|
||||||
if [[ -z ${verb-} ]]; then
|
if [[ -z ${verb-} ]]; then
|
||||||
comps=${VERBS[*]}
|
comps=${VERBS[*]}
|
||||||
|
@ -78,7 +78,7 @@ _portablectl() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
n=$(($COMP_CWORD - $i))
|
n=$((COMP_CWORD - i))
|
||||||
|
|
||||||
if [[ -z ${verb-} ]]; then
|
if [[ -z ${verb-} ]]; then
|
||||||
comps=${VERBS[*]}
|
comps=${VERBS[*]}
|
||||||
|
@ -591,7 +591,7 @@ test_ambient_caps() {
|
|||||||
# CAP_CHOWN | CAP_KILL
|
# CAP_CHOWN | CAP_KILL
|
||||||
MASK=$(((1 << 0) | (1 << 5)))
|
MASK=$(((1 << 0) | (1 << 5)))
|
||||||
|
|
||||||
if [ $(("$BND" & "$MASK")) -ne "$MASK" ] ; then
|
if [ $((BND & MASK)) -ne "$MASK" ] ; then
|
||||||
echo "CAP_CHOWN or CAP_KILL not available in bounding set, skipping test." >&2
|
echo "CAP_CHOWN or CAP_KILL not available in bounding set, skipping test." >&2
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
@ -4,7 +4,7 @@ set -ex
|
|||||||
|
|
||||||
if [ -f /tmp/testsuite-57.counter ] ; then
|
if [ -f /tmp/testsuite-57.counter ] ; then
|
||||||
read -r counter < /tmp/testsuite-57.counter
|
read -r counter < /tmp/testsuite-57.counter
|
||||||
counter=$(("$counter" + 1))
|
counter=$((counter + 1))
|
||||||
else
|
else
|
||||||
counter=0
|
counter=0
|
||||||
fi
|
fi
|
||||||
|
@ -116,13 +116,13 @@ LEAVE=0
|
|||||||
|
|
||||||
function reload() {
|
function reload() {
|
||||||
systemd-notify --reloading --status="Adding 11 to exit status"
|
systemd-notify --reloading --status="Adding 11 to exit status"
|
||||||
EXIT_STATUS=\$((\$EXIT_STATUS + 11))
|
EXIT_STATUS=\$((EXIT_STATUS + 11))
|
||||||
systemd-notify --ready --status="Back running"
|
systemd-notify --ready --status="Back running"
|
||||||
}
|
}
|
||||||
|
|
||||||
function leave() {
|
function leave() {
|
||||||
systemd-notify --stopping --status="Adding 7 to exit status"
|
systemd-notify --stopping --status="Adding 7 to exit status"
|
||||||
EXIT_STATUS=\$((\$EXIT_STATUS + 7))
|
EXIT_STATUS=\$((EXIT_STATUS + 7))
|
||||||
LEAVE=1
|
LEAVE=1
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -138,7 +138,7 @@ while [ \$LEAVE = 0 ] ; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
systemd-notify --status="Adding 3 to exit status"
|
systemd-notify --status="Adding 3 to exit status"
|
||||||
EXIT_STATUS=\$((\$EXIT_STATUS + 3))
|
EXIT_STATUS=\$((EXIT_STATUS + 3))
|
||||||
exit \$EXIT_STATUS
|
exit \$EXIT_STATUS
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user