From: Zbigniew Jędrzejewski-Szmek Date: Tue, 16 Oct 2018 13:30:53 +0000 (+0200) Subject: units: use SuccessAction=reboot-force in systemd-reboot.service X-Git-Tag: v240~530^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d85515edcf9700dc068201ab9f7103f04f3b25b2;p=thirdparty%2Fsystemd.git units: use SuccessAction=reboot-force in systemd-reboot.service --- diff --git a/TODO b/TODO index db2b61c3e26..0b6573518f6 100644 --- a/TODO +++ b/TODO @@ -44,12 +44,6 @@ Features: * chown() tty a service is attached to after the service goes down -* replace systemd-reboot.service's ExecStart= with a single SuccessAction= - line, so that we don't need to fork() for executing the reboot - service. Similar for other services like this, such as systemd-exit.service - and so on. Of course, for this to work service units with no ExecYYZ= set but - SuccessAction= set need to be acceptable. - * optionally: turn on cgroup delegation for per-session scope units * optionally, if a per-partition GPT flag is set for the root/home/… partitions diff --git a/units/meson.build b/units/meson.build index e4ac6ced643..3785e15decf 100644 --- a/units/meson.build +++ b/units/meson.build @@ -97,6 +97,7 @@ units = [ 'sockets.target.wants/'], ['systemd-networkd.socket', 'ENABLE_NETWORKD', join_paths(pkgsysconfdir, 'system/sockets.target.wants/')], + ['systemd-reboot.service', ''], ['systemd-rfkill.socket', 'ENABLE_RFKILL'], ['systemd-tmpfiles-clean.timer', '', 'timers.target.wants/'], @@ -182,7 +183,6 @@ in_units = [ ['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-reboot.service.in b/units/systemd-reboot.service similarity index 89% rename from units/systemd-reboot.service.in rename to units/systemd-reboot.service index 4763ccfdca7..505f60aabf0 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