daandemeyer / rpms / systemd

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