2 # SPDX-License-Identifier: LGPL-2.1-or-later
6 # Segmentation fault in timer_enter_waiting while masking a unit
7 # Issue: https://github.com/systemd/systemd/issues/1981
12 systemctl stop my.timer my.service
13 rm -f /run
/systemd
/system
/my.
{service
,timer
}
14 systemctl daemon-reload
19 mkdir
-p /run
/systemd
/system
21 cat >/run
/systemd
/system
/my.service
<<\EOF
24 ExecStartPre
=sh
-c 'test "$TRIGGER_UNIT" = my.timer'
25 ExecStartPre
=sh
-c 'test -n "$TRIGGER_TIMER_REALTIME_USEC"'
26 ExecStartPre
=sh
-c 'test -n "$TRIGGER_TIMER_MONOTONIC_USEC"'
27 ExecStart
=echo Timer runs me
30 cat >/run
/systemd
/system
/my.timer
<<EOF
36 systemctl unmask my.timer
37 systemctl start my.timer
39 mkdir
-p /run
/systemd
/system
/my.timer.d
/
40 cat >/run
/systemd
/system
/my.timer.d
/override.conf
<<EOF
46 systemctl daemon-reload
47 systemctl mask my.timer