hwdb: fix screen rotation for EXO Wings 2in1 w1125 (#36283)
[systemd.io.git] / test / units / TEST-07-PID1.issue-1981.sh
blobdcfa9b17b0d62c2be70f3ce58cc980d46f128583
1 #!/usr/bin/env bash
2 # SPDX-License-Identifier: LGPL-2.1-or-later
3 set -eux
4 set -o pipefail
6 # Segmentation fault in timer_enter_waiting while masking a unit
7 # Issue: https://github.com/systemd/systemd/issues/1981
9 at_exit() {
10 set +e
12 systemctl stop my.timer my.service
13 rm -f /run/systemd/system/my.{service,timer}
14 systemctl daemon-reload
17 trap at_exit EXIT
19 mkdir -p /run/systemd/system
21 cat >/run/systemd/system/my.service <<\EOF
22 [Service]
23 Type=oneshot
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
28 EOF
30 cat >/run/systemd/system/my.timer <<EOF
31 [Timer]
32 OnBootSec=10s
33 OnUnitInactiveSec=1h
34 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
41 [Timer]
42 OnBootSec=10s
43 OnUnitInactiveSec=1h
44 EOF
46 systemctl daemon-reload
47 systemctl mask my.timer