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