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

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