be0c12
From 7e84234d9953f7ffacf7fff82679c9c9c3b78b7e Mon Sep 17 00:00:00 2001
be0c12
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
be0c12
Date: Tue, 16 Oct 2018 15:34:57 +0200
be0c12
Subject: [PATCH] units: use SuccessAction=poweroff-force in
be0c12
 systemd-poweroff.service
be0c12
be0c12
Explicit systemctl calls remain in systemd-halt.service and the system
be0c12
systemd-exit.service. To convert systemd-halt, we'd need to add
be0c12
SuccessAction=halt-force. Halting doesn't make much sense, so let's just
be0c12
leave that is. systemd-exit.service will be converted in the next commit.
be0c12
be0c12
(cherry picked from commit afa6206583dfbc93e29981cb5d713841e4ca2865)
be0c12
be0c12
Related: #1860899
be0c12
---
be0c12
 units/meson.build                                            | 2 +-
be0c12
 ...{systemd-poweroff.service.in => systemd-poweroff.service} | 5 +----
be0c12
 2 files changed, 2 insertions(+), 5 deletions(-)
be0c12
 rename units/{systemd-poweroff.service.in => systemd-poweroff.service} (89%)
be0c12
be0c12
diff --git a/units/meson.build b/units/meson.build
be0c12
index b482431a10..6fa804148b 100644
be0c12
--- a/units/meson.build
be0c12
+++ b/units/meson.build
be0c12
@@ -97,6 +97,7 @@ units = [
be0c12
          'sockets.target.wants/'],
be0c12
         ['systemd-networkd.socket',             'ENABLE_NETWORKD',
be0c12
          join_paths(pkgsysconfdir, 'system/sockets.target.wants/')],
be0c12
+        ['systemd-poweroff.service',             ''],
be0c12
         ['systemd-reboot.service',               ''],
be0c12
         ['systemd-rfkill.socket',               'ENABLE_RFKILL'],
be0c12
         ['systemd-tmpfiles-clean.timer',        '',
be0c12
@@ -179,7 +180,6 @@ in_units = [
be0c12
         ['systemd-nspawn@.service',              ''],
be0c12
         ['systemd-portabled.service',            'ENABLE_PORTABLED',
be0c12
          'dbus-org.freedesktop.portable1.service'],
be0c12
-        ['systemd-poweroff.service',             ''],
be0c12
         ['systemd-quotacheck.service',           'ENABLE_QUOTACHECK'],
be0c12
         ['systemd-random-seed.service',          'ENABLE_RANDOMSEED',
be0c12
          'sysinit.target.wants/'],
be0c12
diff --git a/units/systemd-poweroff.service.in b/units/systemd-poweroff.service
be0c12
similarity index 89%
be0c12
rename from units/systemd-poweroff.service.in
be0c12
rename to units/systemd-poweroff.service
be0c12
index e9fd655508..8d1d54389b 100644
be0c12
--- a/units/systemd-poweroff.service.in
be0c12
+++ b/units/systemd-poweroff.service
be0c12
@@ -13,7 +13,4 @@ Documentation=man:systemd-halt.service(8)
be0c12
 DefaultDependencies=no
be0c12
 Requires=shutdown.target umount.target final.target
be0c12
 After=shutdown.target umount.target final.target
be0c12
-
be0c12
-[Service]
be0c12
-Type=oneshot
be0c12
-ExecStart=@SYSTEMCTL@ --force poweroff
be0c12
+SuccessAction=poweroff-force