1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-11 05:17:44 +03:00
systemd-stable/test/units/testsuite-57-short-lived.sh
Zbigniew Jędrzejewski-Szmek 4ccde410a3 tree-wide: change --kill-who to --kill-whom
getopt allows non-ambiguous abbreviations, so backwards-compat is maintained, and
people can use --kill-who (or even shorter abbreviations). English is flexible,
so in common speach people would use both forms, even if "whom" is technically
more correct. The advantage of using the longer form in the code is that we
effectively allow both forms, so we stop punishing people who DTGCT¹, but still
allow people to use the spoken form if they prefer.

1. Do the gramatically correct thing
2022-08-26 11:15:44 +09:00

19 lines
379 B
Bash
Executable File

#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -ex
if [ -f /tmp/testsuite-57.counter ] ; then
read -r counter < /tmp/testsuite-57.counter
counter=$(("$counter" + 1))
else
counter=0
fi
echo "$counter" > /tmp/testsuite-57.counter
if [ "$counter" -eq 5 ] ; then
systemctl kill --kill-whom=main -sUSR1 testsuite-57.service
fi
exec sleep 1.5