diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-10-17 21:29:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-17 21:29:10 +0200 |
commit | a42984dbc7fce567acf33270e39e11fef81abc0c (patch) | |
tree | b6a4b529b00d2e4ff5dcfd01bab894da2c1a20a6 /units | |
parent | 33eb44fe4a8d7971b5614bc4c2d90f8d91cce66c (diff) | |
parent | c7adcb1af9946d0672c16bb4bb7eedf39b3d1fcb (diff) | |
download | systemd-a42984dbc7fce567acf33270e39e11fef81abc0c.tar.gz |
Merge pull request #10428 from keszybz/failure-actions
Implement manager status changes using SuccessAction=
Diffstat (limited to 'units')
-rw-r--r-- | units/meson.build | 6 | ||||
-rw-r--r-- | units/systemd-exit.service (renamed from units/systemd-exit.service.in) | 5 | ||||
-rw-r--r-- | units/systemd-poweroff.service (renamed from units/systemd-poweroff.service.in) | 5 | ||||
-rw-r--r-- | units/systemd-reboot.service (renamed from units/systemd-reboot.service.in) | 5 | ||||
-rw-r--r-- | units/user/meson.build | 2 | ||||
-rw-r--r-- | units/user/systemd-exit.service (renamed from units/user/systemd-exit.service.in) | 5 |
6 files changed, 8 insertions, 20 deletions
diff --git a/units/meson.build b/units/meson.build index e4ac6ced64..3cc86b3e92 100644 --- a/units/meson.build +++ b/units/meson.build @@ -85,6 +85,7 @@ units = [ 'multi-user.target.wants/'], ['systemd-coredump.socket', 'ENABLE_COREDUMP', 'sockets.target.wants/'], + ['systemd-exit.service', ''], ['systemd-initctl.socket', '', 'sockets.target.wants/'], ['systemd-journal-gatewayd.socket', 'ENABLE_REMOTE HAVE_MICROHTTPD'], @@ -97,6 +98,8 @@ units = [ 'sockets.target.wants/'], ['systemd-networkd.socket', 'ENABLE_NETWORKD', join_paths(pkgsysconfdir, 'system/sockets.target.wants/')], + ['systemd-poweroff.service', ''], + ['systemd-reboot.service', ''], ['systemd-rfkill.socket', 'ENABLE_RFKILL'], ['systemd-tmpfiles-clean.timer', '', 'timers.target.wants/'], @@ -133,7 +136,6 @@ in_units = [ ['systemd-binfmt.service', 'ENABLE_BINFMT', 'sysinit.target.wants/'], ['systemd-coredump@.service', 'ENABLE_COREDUMP'], - ['systemd-exit.service', ''], ['systemd-firstboot.service', 'ENABLE_FIRSTBOOT', 'sysinit.target.wants/'], ['systemd-fsck-root.service', ''], @@ -178,11 +180,9 @@ in_units = [ ['systemd-nspawn@.service', ''], ['systemd-portabled.service', 'ENABLE_PORTABLED', 'dbus-org.freedesktop.portable1.service'], - ['systemd-poweroff.service', ''], ['systemd-quotacheck.service', 'ENABLE_QUOTACHECK'], ['systemd-random-seed.service', 'ENABLE_RANDOMSEED', 'sysinit.target.wants/'], - ['systemd-reboot.service', ''], ['systemd-remount-fs.service', '', 'local-fs.target.wants/'], ['systemd-resolved.service', 'ENABLE_RESOLVE', diff --git a/units/systemd-exit.service.in b/units/systemd-exit.service index 2fb6ebd767..6029b13a05 100644 --- a/units/systemd-exit.service.in +++ b/units/systemd-exit.service @@ -13,7 +13,4 @@ Documentation=man:systemd.special(7) DefaultDependencies=no Requires=shutdown.target After=shutdown.target - -[Service] -Type=oneshot -ExecStart=@SYSTEMCTL@ --force exit +SuccessAction=exit diff --git a/units/systemd-poweroff.service.in b/units/systemd-poweroff.service index e9fd655508..8d1d54389b 100644 --- a/units/systemd-poweroff.service.in +++ b/units/systemd-poweroff.service @@ -13,7 +13,4 @@ Documentation=man:systemd-halt.service(8) DefaultDependencies=no Requires=shutdown.target umount.target final.target After=shutdown.target umount.target final.target - -[Service] -Type=oneshot -ExecStart=@SYSTEMCTL@ --force poweroff +SuccessAction=poweroff-force diff --git a/units/systemd-reboot.service.in b/units/systemd-reboot.service index 4763ccfdca..505f60aabf 100644 --- a/units/systemd-reboot.service.in +++ b/units/systemd-reboot.service @@ -13,7 +13,4 @@ Documentation=man:systemd-halt.service(8) DefaultDependencies=no Requires=shutdown.target umount.target final.target After=shutdown.target umount.target final.target - -[Service] -Type=oneshot -ExecStart=@SYSTEMCTL@ --force reboot +SuccessAction=reboot-force diff --git a/units/user/meson.build b/units/user/meson.build index b1c2e95597..36341a42f5 100644 --- a/units/user/meson.build +++ b/units/user/meson.build @@ -14,6 +14,7 @@ units = [ 'sockets.target', 'sound.target', 'timers.target', + 'systemd-exit.service', 'systemd-tmpfiles-clean.timer', ] @@ -23,7 +24,6 @@ foreach file : units endforeach in_units = [ - 'systemd-exit.service', 'systemd-tmpfiles-clean.service', 'systemd-tmpfiles-setup.service', ] diff --git a/units/user/systemd-exit.service.in b/units/user/systemd-exit.service index d69273f6b3..1d3b61e3ab 100644 --- a/units/user/systemd-exit.service.in +++ b/units/user/systemd-exit.service @@ -13,7 +13,4 @@ Documentation=man:systemd.special(7) DefaultDependencies=no Requires=shutdown.target After=shutdown.target - -[Service] -Type=oneshot -ExecStart=@SYSTEMCTL@ --user --force exit +SuccessAction=exit-force |