Blame SOURCES/0392-systemd-add-.slice-and-make-reboot-work.patch

a0a3b4
From 017c16b97a384915467583cc07c3afb9a98fc259 Mon Sep 17 00:00:00 2001
a0a3b4
From: Harald Hoyer <harald@redhat.com>
a0a3b4
Date: Mon, 27 Jun 2016 10:27:05 +0200
a0a3b4
Subject: [PATCH] systemd: add -.slice and make reboot work
a0a3b4
a0a3b4
-.slice and conflicting with emergency.target and shutdown.target
a0a3b4
makes reboot work
a0a3b4
---
a0a3b4
 modules.d/98systemd/dracut-cmdline-ask.service | 2 ++
a0a3b4
 modules.d/98systemd/dracut-cmdline.service     | 2 ++
a0a3b4
 modules.d/98systemd/dracut-emergency.service   | 2 ++
a0a3b4
 modules.d/98systemd/dracut-initqueue.service   | 2 ++
a0a3b4
 modules.d/98systemd/dracut-mount.service       | 2 ++
a0a3b4
 modules.d/98systemd/dracut-pre-mount.service   | 2 ++
a0a3b4
 modules.d/98systemd/dracut-pre-pivot.service   | 2 ++
a0a3b4
 modules.d/98systemd/dracut-pre-trigger.service | 2 ++
a0a3b4
 modules.d/98systemd/dracut-pre-udev.service    | 2 ++
a0a3b4
 modules.d/98systemd/emergency.service          | 2 ++
a0a3b4
 modules.d/98systemd/module-setup.sh            | 1 +
a0a3b4
 11 files changed, 21 insertions(+)
a0a3b4
a0a3b4
diff --git a/modules.d/98systemd/dracut-cmdline-ask.service b/modules.d/98systemd/dracut-cmdline-ask.service
1755ca
index 9993671c..3d489a4e 100644
a0a3b4
--- a/modules.d/98systemd/dracut-cmdline-ask.service
a0a3b4
+++ b/modules.d/98systemd/dracut-cmdline-ask.service
a0a3b4
@@ -15,6 +15,8 @@ After=systemd-journald.socket
a0a3b4
 Wants=systemd-journald.socket
a0a3b4
 ConditionPathExists=/etc/initrd-release
a0a3b4
 ConditionKernelCommandLine=rd.cmdline=ask
a0a3b4
+Conflicts=shutdown.target emergency.target
a0a3b4
+Before=shutdown.target emergency.target
a0a3b4
 
a0a3b4
 [Service]
a0a3b4
 Environment=DRACUT_SYSTEMD=1
a0a3b4
diff --git a/modules.d/98systemd/dracut-cmdline.service b/modules.d/98systemd/dracut-cmdline.service
1755ca
index f888bf46..7f0835b4 100644
a0a3b4
--- a/modules.d/98systemd/dracut-cmdline.service
a0a3b4
+++ b/modules.d/98systemd/dracut-cmdline.service
a0a3b4
@@ -20,6 +20,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline
a0a3b4
 ConditionKernelCommandLine=|rd.break=cmdline
a0a3b4
 ConditionKernelCommandLine=|resume
a0a3b4
 ConditionKernelCommandLine=|noresume
a0a3b4
+Conflicts=shutdown.target emergency.target
a0a3b4
+Before=shutdown.target emergency.target
a0a3b4
 
a0a3b4
 [Service]
a0a3b4
 Environment=DRACUT_SYSTEMD=1
a0a3b4
diff --git a/modules.d/98systemd/dracut-emergency.service b/modules.d/98systemd/dracut-emergency.service
1755ca
index 5a6d5250..5c014110 100644
a0a3b4
--- a/modules.d/98systemd/dracut-emergency.service
a0a3b4
+++ b/modules.d/98systemd/dracut-emergency.service
a0a3b4
@@ -14,6 +14,8 @@ After=systemd-vconsole-setup.service
a0a3b4
 Wants=systemd-vconsole-setup.service
a0a3b4
 Conflicts=emergency.service emergency.target
a0a3b4
 ConditionPathExists=!/lib/dracut/no-emergency-shell
a0a3b4
+Conflicts=shutdown.target emergency.target
a0a3b4
+Before=shutdown.target emergency.target
a0a3b4
 
a0a3b4
 [Service]
a0a3b4
 Environment=HOME=/
a0a3b4
diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service
1755ca
index 1b9e701b..6340dd4d 100644
a0a3b4
--- a/modules.d/98systemd/dracut-initqueue.service
a0a3b4
+++ b/modules.d/98systemd/dracut-initqueue.service
a0a3b4
@@ -23,6 +23,8 @@ ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/finished/*.sh
a0a3b4
 ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/online/*.sh
a0a3b4
 ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/timeout/*.sh
a0a3b4
 ConditionKernelCommandLine=|rd.break=initqueue
a0a3b4
+Conflicts=shutdown.target emergency.target
a0a3b4
+Before=shutdown.target emergency.target
a0a3b4
 
a0a3b4
 [Service]
a0a3b4
 Environment=DRACUT_SYSTEMD=1
a0a3b4
diff --git a/modules.d/98systemd/dracut-mount.service b/modules.d/98systemd/dracut-mount.service
1755ca
index 20c633d0..2e1e47b9 100644
a0a3b4
--- a/modules.d/98systemd/dracut-mount.service
a0a3b4
+++ b/modules.d/98systemd/dracut-mount.service
a0a3b4
@@ -15,6 +15,8 @@ After=dracut-initqueue.service dracut-pre-mount.service
a0a3b4
 ConditionPathExists=/etc/initrd-release
a0a3b4
 ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount
a0a3b4
 ConditionKernelCommandLine=|rd.break=mount
a0a3b4
+Conflicts=shutdown.target emergency.target
a0a3b4
+Before=shutdown.target emergency.target
a0a3b4
 
a0a3b4
 [Service]
a0a3b4
 Environment=DRACUT_SYSTEMD=1
a0a3b4
diff --git a/modules.d/98systemd/dracut-pre-mount.service b/modules.d/98systemd/dracut-pre-mount.service
1755ca
index d7be48d8..ed67f9df 100644
a0a3b4
--- a/modules.d/98systemd/dracut-pre-mount.service
a0a3b4
+++ b/modules.d/98systemd/dracut-pre-mount.service
a0a3b4
@@ -17,6 +17,8 @@ After=cryptsetup.target
a0a3b4
 ConditionPathExists=/etc/initrd-release
a0a3b4
 ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount
a0a3b4
 ConditionKernelCommandLine=|rd.break=pre-mount
a0a3b4
+Conflicts=shutdown.target emergency.target
a0a3b4
+Before=shutdown.target emergency.target
a0a3b4
 
a0a3b4
 [Service]
a0a3b4
 Environment=DRACUT_SYSTEMD=1
a0a3b4
diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service
1755ca
index f4539006..1faeb78b 100644
a0a3b4
--- a/modules.d/98systemd/dracut-pre-pivot.service
a0a3b4
+++ b/modules.d/98systemd/dracut-pre-pivot.service
a0a3b4
@@ -16,6 +16,8 @@ Before=initrd-cleanup.service
a0a3b4
 Wants=remote-fs.target
a0a3b4
 After=remote-fs.target
a0a3b4
 ConditionPathExists=/etc/initrd-release
a0a3b4
+Conflicts=shutdown.target emergency.target
a0a3b4
+Before=shutdown.target emergency.target
a0a3b4
 
a0a3b4
 [Service]
a0a3b4
 Environment=DRACUT_SYSTEMD=1
a0a3b4
diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service
1755ca
index 69b4cceb..f1980368 100644
a0a3b4
--- a/modules.d/98systemd/dracut-pre-trigger.service
a0a3b4
+++ b/modules.d/98systemd/dracut-pre-trigger.service
a0a3b4
@@ -17,6 +17,8 @@ Wants=dracut-pre-udev.service systemd-udevd.service
a0a3b4
 ConditionPathExists=/etc/initrd-release
a0a3b4
 ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger
a0a3b4
 ConditionKernelCommandLine=|rd.break=pre-trigger
a0a3b4
+Conflicts=shutdown.target emergency.target
a0a3b4
+Before=shutdown.target emergency.target
a0a3b4
 
a0a3b4
 [Service]
a0a3b4
 Environment=DRACUT_SYSTEMD=1
a0a3b4
diff --git a/modules.d/98systemd/dracut-pre-udev.service b/modules.d/98systemd/dracut-pre-udev.service
1755ca
index d125b375..7fb33044 100644
a0a3b4
--- a/modules.d/98systemd/dracut-pre-udev.service
a0a3b4
+++ b/modules.d/98systemd/dracut-pre-udev.service
a0a3b4
@@ -20,6 +20,8 @@ ConditionKernelCommandLine=|rd.break=pre-udev
a0a3b4
 ConditionKernelCommandLine=|rd.driver.blacklist
a0a3b4
 ConditionKernelCommandLine=|rd.driver.pre
a0a3b4
 ConditionKernelCommandLine=|rd.driver.post
a0a3b4
+Conflicts=shutdown.target emergency.target
a0a3b4
+Before=shutdown.target emergency.target
a0a3b4
 
a0a3b4
 [Service]
a0a3b4
 Environment=DRACUT_SYSTEMD=1
a0a3b4
diff --git a/modules.d/98systemd/emergency.service b/modules.d/98systemd/emergency.service
1755ca
index 5f1eaa23..5c2c1c70 100644
a0a3b4
--- a/modules.d/98systemd/emergency.service
a0a3b4
+++ b/modules.d/98systemd/emergency.service
a0a3b4
@@ -13,6 +13,8 @@ DefaultDependencies=no
a0a3b4
 After=systemd-vconsole-setup.service
a0a3b4
 Wants=systemd-vconsole-setup.service
a0a3b4
 ConditionPathExists=!/lib/dracut/no-emergency-shell
a0a3b4
+Conflicts=shutdown.target
a0a3b4
+Before=shutdown.target
a0a3b4
 
a0a3b4
 [Service]
a0a3b4
 Environment=HOME=/
a0a3b4
diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh
1755ca
index 647315f0..64b83a0e 100755
a0a3b4
--- a/modules.d/98systemd/module-setup.sh
a0a3b4
+++ b/modules.d/98systemd/module-setup.sh
a0a3b4
@@ -137,6 +137,7 @@ install() {
a0a3b4
         \
a0a3b4
         $systemdsystemunitdir/slices.target \
a0a3b4
         $systemdsystemunitdir/system.slice \
a0a3b4
+        $systemdsystemunitdir/-.slice \
a0a3b4
         \
a0a3b4
         $tmpfilesdir/systemd.conf \
a0a3b4
         \