]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-07-ISSUE-1981/test-segfault.sh
tests: add test for https://github.com/systemd/systemd/issues/1981
[thirdparty/systemd.git] / test / TEST-07-ISSUE-1981 / test-segfault.sh
CommitLineData
09f6f45a
EV
1#!/bin/bash
2
3set -x
4set -e
5
6>/failed
7
8cat <<'EOL' >/lib/systemd/system/my.service
9[Service]
10Type=oneshot
11ExecStart=/bin/echo Timer runs me
12EOL
13
14cat <<'EOL' >/lib/systemd/system/my.timer
15[Timer]
16OnBootSec=10s
17OnUnitInactiveSec=1h
18EOL
19
20systemctl unmask my.timer
21
22systemctl start my.timer
23
24mkdir -p /etc/systemd/system/my.timer.d/
25cat <<'EOL' >/etc/systemd/system/my.timer.d/override.conf
26[Timer]
27OnBootSec=10s
28OnUnitInactiveSec=1h
29EOL
30
31systemctl daemon-reload
32
33systemctl mask my.timer
34
35touch /testok
36rm /failed