Blame 0089-dracut-systemd-.service-conflict-with-shutdown-targe.patch

Harald Hoyer 414eba
From c000a21c25bd436f2b3cc2076cb7025cc82d2807 Mon Sep 17 00:00:00 2001
Harald Hoyer 414eba
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 414eba
Date: Wed, 22 Jun 2016 18:12:19 +0200
Harald Hoyer 414eba
Subject: [PATCH] dracut-systemd/*.service: conflict with shutdown target
Harald Hoyer 414eba
Harald Hoyer 414eba
make reboot/poweroff/halt work
Harald Hoyer 414eba
Harald Hoyer 414eba
also conflict with emergency.target
Harald Hoyer 414eba
---
Harald Hoyer 414eba
 modules.d/98dracut-systemd/dracut-cmdline-ask.service | 2 ++
Harald Hoyer 414eba
 modules.d/98dracut-systemd/dracut-cmdline.service     | 2 ++
Harald Hoyer 414eba
 modules.d/98dracut-systemd/dracut-emergency.service   | 5 +++--
Harald Hoyer 414eba
 modules.d/98dracut-systemd/dracut-initqueue.service   | 2 ++
Harald Hoyer 414eba
 modules.d/98dracut-systemd/dracut-mount.service       | 2 ++
Harald Hoyer 414eba
 modules.d/98dracut-systemd/dracut-pre-mount.service   | 2 ++
Harald Hoyer 414eba
 modules.d/98dracut-systemd/dracut-pre-pivot.service   | 3 +++
Harald Hoyer 414eba
 modules.d/98dracut-systemd/dracut-pre-trigger.service | 2 ++
Harald Hoyer 414eba
 modules.d/98dracut-systemd/dracut-pre-udev.service    | 2 ++
Harald Hoyer 414eba
 modules.d/98dracut-systemd/emergency.service          | 2 ++
Harald Hoyer 414eba
 10 files changed, 22 insertions(+), 2 deletions(-)
Harald Hoyer 414eba
Harald Hoyer 414eba
diff --git a/modules.d/98dracut-systemd/dracut-cmdline-ask.service b/modules.d/98dracut-systemd/dracut-cmdline-ask.service
Harald Hoyer 414eba
index 8bc7d80..1685479 100644
Harald Hoyer 414eba
--- a/modules.d/98dracut-systemd/dracut-cmdline-ask.service
Harald Hoyer 414eba
+++ b/modules.d/98dracut-systemd/dracut-cmdline-ask.service
Harald Hoyer 414eba
@@ -16,6 +16,8 @@ Wants=systemd-journald.socket
Harald Hoyer 414eba
 ConditionPathExists=/usr/lib/initrd-release
Harald Hoyer 414eba
 ConditionKernelCommandLine=|rd.cmdline=ask
Harald Hoyer 414eba
 ConditionPathExistsGlob=|/etc/cmdline.d/*.conf
Harald Hoyer 414eba
+Conflicts=shutdown.target emergency.target
Harald Hoyer 414eba
+Before=shutdown.target emergency.target
Harald Hoyer 414eba
 
Harald Hoyer 414eba
 [Service]
Harald Hoyer 414eba
 Environment=DRACUT_SYSTEMD=1
Harald Hoyer 414eba
diff --git a/modules.d/98dracut-systemd/dracut-cmdline.service b/modules.d/98dracut-systemd/dracut-cmdline.service
Harald Hoyer 414eba
index 6eeb991..c22856e 100644
Harald Hoyer 414eba
--- a/modules.d/98dracut-systemd/dracut-cmdline.service
Harald Hoyer 414eba
+++ b/modules.d/98dracut-systemd/dracut-cmdline.service
Harald Hoyer 414eba
@@ -20,6 +20,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline
Harald Hoyer 414eba
 ConditionKernelCommandLine=|rd.break=cmdline
Harald Hoyer 414eba
 ConditionKernelCommandLine=|resume
Harald Hoyer 414eba
 ConditionKernelCommandLine=|noresume
Harald Hoyer 414eba
+Conflicts=shutdown.target emergency.target
Harald Hoyer 414eba
+Before=shutdown.target emergency.target
Harald Hoyer 414eba
 
Harald Hoyer 414eba
 [Service]
Harald Hoyer 414eba
 Environment=DRACUT_SYSTEMD=1
Harald Hoyer 414eba
diff --git a/modules.d/98dracut-systemd/dracut-emergency.service b/modules.d/98dracut-systemd/dracut-emergency.service
Harald Hoyer 414eba
index a523671..61077bd 100644
Harald Hoyer 414eba
--- a/modules.d/98dracut-systemd/dracut-emergency.service
Harald Hoyer 414eba
+++ b/modules.d/98dracut-systemd/dracut-emergency.service
Harald Hoyer 414eba
@@ -12,14 +12,15 @@ Description=Dracut Emergency Shell
Harald Hoyer 414eba
 DefaultDependencies=no
Harald Hoyer 414eba
 After=systemd-vconsole-setup.service
Harald Hoyer 414eba
 Wants=systemd-vconsole-setup.service
Harald Hoyer 414eba
-Conflicts=emergency.service emergency.target
Harald Hoyer 414eba
+Conflicts=shutdown.target emergency.target
Harald Hoyer 414eba
+Before=shutdown.target emergency.target
Harald Hoyer 414eba
 
Harald Hoyer 414eba
 [Service]
Harald Hoyer 414eba
 Environment=HOME=/
Harald Hoyer 414eba
 Environment=DRACUT_SYSTEMD=1
Harald Hoyer 414eba
 Environment=NEWROOT=/sysroot
Harald Hoyer 414eba
 WorkingDirectory=/
Harald Hoyer 414eba
-ExecStart=/bin/dracut-emergency
Harald Hoyer 414eba
+ExecStart=-/bin/dracut-emergency
Harald Hoyer 414eba
 ExecStopPost=-/bin/rm -f -- /.console_lock
Harald Hoyer 414eba
 Type=oneshot
Harald Hoyer 414eba
 StandardInput=tty-force
Harald Hoyer 414eba
diff --git a/modules.d/98dracut-systemd/dracut-initqueue.service b/modules.d/98dracut-systemd/dracut-initqueue.service
Harald Hoyer 414eba
index fa5ca56..20d6a8c 100644
Harald Hoyer 414eba
--- a/modules.d/98dracut-systemd/dracut-initqueue.service
Harald Hoyer 414eba
+++ b/modules.d/98dracut-systemd/dracut-initqueue.service
Harald Hoyer 414eba
@@ -18,6 +18,8 @@ Wants=systemd-udev-trigger.service
Harald Hoyer 414eba
 ConditionPathExists=/usr/lib/initrd-release
Harald Hoyer 414eba
 ConditionPathExists=|/lib/dracut/need-initqueue
Harald Hoyer 414eba
 ConditionKernelCommandLine=|rd.break=initqueue
Harald Hoyer 414eba
+Conflicts=shutdown.target emergency.target
Harald Hoyer 414eba
+Before=shutdown.target emergency.target
Harald Hoyer 414eba
 
Harald Hoyer 414eba
 [Service]
Harald Hoyer 414eba
 Environment=DRACUT_SYSTEMD=1
Harald Hoyer 414eba
diff --git a/modules.d/98dracut-systemd/dracut-mount.service b/modules.d/98dracut-systemd/dracut-mount.service
Harald Hoyer 414eba
index 1b14f4a..baa8edb 100644
Harald Hoyer 414eba
--- a/modules.d/98dracut-systemd/dracut-mount.service
Harald Hoyer 414eba
+++ b/modules.d/98dracut-systemd/dracut-mount.service
Harald Hoyer 414eba
@@ -15,6 +15,8 @@ After=dracut-initqueue.service dracut-pre-mount.service
Harald Hoyer 414eba
 ConditionPathExists=/usr/lib/initrd-release
Harald Hoyer 414eba
 ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount
Harald Hoyer 414eba
 ConditionKernelCommandLine=|rd.break=mount
Harald Hoyer 414eba
+Conflicts=shutdown.target emergency.target
Harald Hoyer 414eba
+Before=shutdown.target emergency.target
Harald Hoyer 414eba
 
Harald Hoyer 414eba
 [Service]
Harald Hoyer 414eba
 Environment=DRACUT_SYSTEMD=1
Harald Hoyer 414eba
diff --git a/modules.d/98dracut-systemd/dracut-pre-mount.service b/modules.d/98dracut-systemd/dracut-pre-mount.service
Harald Hoyer 414eba
index 1e4e29f..c7b123c 100644
Harald Hoyer 414eba
--- a/modules.d/98dracut-systemd/dracut-pre-mount.service
Harald Hoyer 414eba
+++ b/modules.d/98dracut-systemd/dracut-pre-mount.service
Harald Hoyer 414eba
@@ -17,6 +17,8 @@ After=cryptsetup.target
Harald Hoyer 414eba
 ConditionPathExists=/usr/lib/initrd-release
Harald Hoyer 414eba
 ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount
Harald Hoyer 414eba
 ConditionKernelCommandLine=|rd.break=pre-mount
Harald Hoyer 414eba
+Conflicts=shutdown.target emergency.target
Harald Hoyer 414eba
+Before=shutdown.target emergency.target
Harald Hoyer 414eba
 
Harald Hoyer 414eba
 [Service]
Harald Hoyer 414eba
 Environment=DRACUT_SYSTEMD=1
Harald Hoyer 414eba
diff --git a/modules.d/98dracut-systemd/dracut-pre-pivot.service b/modules.d/98dracut-systemd/dracut-pre-pivot.service
Harald Hoyer 414eba
index f5a85ce..20a872a 100644
Harald Hoyer 414eba
--- a/modules.d/98dracut-systemd/dracut-pre-pivot.service
Harald Hoyer 414eba
+++ b/modules.d/98dracut-systemd/dracut-pre-pivot.service
Harald Hoyer 414eba
@@ -10,6 +10,7 @@
Harald Hoyer 414eba
 [Unit]
Harald Hoyer 414eba
 Description=dracut pre-pivot and cleanup hook
Harald Hoyer 414eba
 Documentation=man:dracut-pre-pivot.service(8)
Harald Hoyer 414eba
+DefaultDependencies=no
Harald Hoyer 414eba
 After=initrd.target initrd-parse-etc.service sysroot.mount
Harald Hoyer 414eba
 After=dracut-initqueue.service dracut-pre-mount.service dracut-mount.service
Harald Hoyer 414eba
 Before=initrd-cleanup.service
Harald Hoyer 414eba
@@ -23,6 +24,8 @@ ConditionKernelCommandLine=|rd.break=cleanup
Harald Hoyer 414eba
 ConditionKernelCommandLine=|rd.break
Harald Hoyer 414eba
 ConditionPathExists=|/dev/root
Harald Hoyer 414eba
 ConditionPathExists=|/dev/nfs
Harald Hoyer 414eba
+Conflicts=shutdown.target emergency.target
Harald Hoyer 414eba
+Before=shutdown.target emergency.target
Harald Hoyer 414eba
 
Harald Hoyer 414eba
 [Service]
Harald Hoyer 414eba
 Environment=DRACUT_SYSTEMD=1
Harald Hoyer 414eba
diff --git a/modules.d/98dracut-systemd/dracut-pre-trigger.service b/modules.d/98dracut-systemd/dracut-pre-trigger.service
Harald Hoyer 414eba
index 826b89b..2df9d7b 100644
Harald Hoyer 414eba
--- a/modules.d/98dracut-systemd/dracut-pre-trigger.service
Harald Hoyer 414eba
+++ b/modules.d/98dracut-systemd/dracut-pre-trigger.service
Harald Hoyer 414eba
@@ -17,6 +17,8 @@ Wants=dracut-pre-udev.service systemd-udevd.service
Harald Hoyer 414eba
 ConditionPathExists=/usr/lib/initrd-release
Harald Hoyer 414eba
 ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger
Harald Hoyer 414eba
 ConditionKernelCommandLine=|rd.break=pre-trigger
Harald Hoyer 414eba
+Conflicts=shutdown.target emergency.target
Harald Hoyer 414eba
+Before=shutdown.target emergency.target
Harald Hoyer 414eba
 
Harald Hoyer 414eba
 [Service]
Harald Hoyer 414eba
 Environment=DRACUT_SYSTEMD=1
Harald Hoyer 414eba
diff --git a/modules.d/98dracut-systemd/dracut-pre-udev.service b/modules.d/98dracut-systemd/dracut-pre-udev.service
Harald Hoyer 414eba
index 73740be..7fdeb6e 100644
Harald Hoyer 414eba
--- a/modules.d/98dracut-systemd/dracut-pre-udev.service
Harald Hoyer 414eba
+++ b/modules.d/98dracut-systemd/dracut-pre-udev.service
Harald Hoyer 414eba
@@ -20,6 +20,8 @@ ConditionKernelCommandLine=|rd.break=pre-udev
Harald Hoyer 414eba
 ConditionKernelCommandLine=|rd.driver.blacklist
Harald Hoyer 414eba
 ConditionKernelCommandLine=|rd.driver.pre
Harald Hoyer 414eba
 ConditionKernelCommandLine=|rd.driver.post
Harald Hoyer 414eba
+Conflicts=shutdown.target emergency.target
Harald Hoyer 414eba
+Before=shutdown.target emergency.target
Harald Hoyer 414eba
 
Harald Hoyer 414eba
 [Service]
Harald Hoyer 414eba
 Environment=DRACUT_SYSTEMD=1
Harald Hoyer 414eba
diff --git a/modules.d/98dracut-systemd/emergency.service b/modules.d/98dracut-systemd/emergency.service
Harald Hoyer 414eba
index 35d9c31..969a300 100644
Harald Hoyer 414eba
--- a/modules.d/98dracut-systemd/emergency.service
Harald Hoyer 414eba
+++ b/modules.d/98dracut-systemd/emergency.service
Harald Hoyer 414eba
@@ -12,6 +12,8 @@ Description=Emergency Shell
Harald Hoyer 414eba
 DefaultDependencies=no
Harald Hoyer 414eba
 After=systemd-vconsole-setup.service
Harald Hoyer 414eba
 Wants=systemd-vconsole-setup.service
Harald Hoyer 414eba
+Conflicts=shutdown.target
Harald Hoyer 414eba
+Before=shutdown.target
Harald Hoyer 414eba
 
Harald Hoyer 414eba
 [Service]
Harald Hoyer 414eba
 Environment=HOME=/