4 systemd-analyze log-level debug
6 systemd-run
--unit=simple1.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=simple
-p ExecStopPost
='/bin/touch /run/simple1' true
9 systemd-run
--unit=simple2.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=simple
-p ExecStopPost
='/bin/touch /run/simple2' false \
10 && { echo 'unexpected success'; exit 1; }
13 systemd-run
--unit=exec1.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=exec -p ExecStopPost
='/bin/touch /run/exec1' sleep 1
16 systemd-run
--unit=exec2.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=exec -p ExecStopPost
='/bin/touch /run/exec2' sh
-c 'sleep 1; false' \
17 && { echo 'unexpected success'; exit 1; }
20 cat >/tmp
/forking1.sh
<<EOF
29 systemd-notify MAINPID=\$MAINPID
31 chmod +x
/tmp
/forking1.sh
33 systemd-run
--unit=forking1.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=forking
-p NotifyAccess
=exec -p ExecStopPost
='/bin/touch /run/forking1' /tmp
/forking1.sh
36 cat >/tmp
/forking2.sh
<<EOF
45 systemd-notify MAINPID=\$MAINPID
47 chmod +x
/tmp
/forking2.sh
49 systemd-run
--unit=forking2.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=forking
-p NotifyAccess
=exec -p ExecStopPost
='/bin/touch /run/forking2' /tmp
/forking2.sh \
50 && { echo 'unexpected success'; exit 1; }
53 systemd-run
--unit=oneshot1.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=oneshot
-p ExecStopPost
='/bin/touch /run/oneshot1' true
56 systemd-run
--unit=oneshot2.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=oneshot
-p ExecStopPost
='/bin/touch /run/oneshot2' false \
57 && { echo 'unexpected success'; exit 1; }
60 systemd-run
--unit=dbus1.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=dbus
-p BusName
=systemd.
test.ExecStopPost
-p ExecStopPost
='/bin/touch /run/dbus1' \
61 busctl call org.freedesktop.DBus
/org
/freedesktop
/DBus org.freedesktop.DBus RequestName su systemd.
test.ExecStopPost
4 \
65 systemd-run
--unit=dbus2.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=dbus
-p BusName
=systemd.
test.ExecStopPost
-p ExecStopPost
='/bin/touch /run/dbus2' true
68 # https://github.com/systemd/systemd/issues/19920
69 systemd-run
--unit=dbus3.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=dbus
-p ExecStopPost
='/bin/touch /run/dbus3' true \
70 && { echo 'unexpected success'; exit 1; }
72 cat >/tmp
/notify1.sh
<<EOF
77 systemd-notify --ready
79 chmod +x
/tmp
/notify1.sh
81 systemd-run
--unit=notify1.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=notify
-p ExecStopPost
='/bin/touch /run/notify1' /tmp
/notify1.sh
84 systemd-run
--unit=notify2.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=notify
-p ExecStopPost
='/bin/touch /run/notify2' true \
85 && { echo 'unexpected success'; exit 1; }
88 systemd-run
--unit=idle1.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=idle
-p ExecStopPost
='/bin/touch /run/idle1' true
91 systemd-run
--unit=idle2.service
--wait -p StandardOutput
=tty
-p StandardError
=tty
-p Type
=idle
-p ExecStopPost
='/bin/touch /run/idle2' false \
92 && { echo 'unexpected success'; exit 1; }
95 systemd-analyze log-level info