Blame SOURCES/0429-systemd-let-booting-work-after-exiting-emergency.patch

18971c
From fd8506b5da5e81736f408bc3c4c801544a38899e Mon Sep 17 00:00:00 2001
18971c
From: Harald Hoyer <harald@redhat.com>
18971c
Date: Thu, 30 Jun 2016 16:34:06 +0200
18971c
Subject: [PATCH] systemd: let booting work after exiting emergency
18971c
18971c
If the user managed to mount /sysroot, let it work
18971c
---
18971c
 modules.d/98systemd/dracut-cmdline-ask.service | 1 -
18971c
 modules.d/98systemd/dracut-cmdline.service     | 1 -
18971c
 modules.d/98systemd/dracut-emergency.service   | 2 --
18971c
 modules.d/98systemd/dracut-initqueue.service   | 1 -
18971c
 modules.d/98systemd/dracut-mount.service       | 1 -
18971c
 modules.d/98systemd/dracut-pre-mount.service   | 1 -
18971c
 modules.d/98systemd/dracut-pre-pivot.service   | 1 -
18971c
 modules.d/98systemd/dracut-pre-trigger.service | 1 -
18971c
 modules.d/98systemd/dracut-pre-udev.service    | 1 -
18971c
 modules.d/98systemd/emergency.service          | 7 +++----
18971c
 10 files changed, 3 insertions(+), 14 deletions(-)
18971c
18971c
diff --git a/modules.d/98systemd/dracut-cmdline-ask.service b/modules.d/98systemd/dracut-cmdline-ask.service
18971c
index 3d489a4e..f9dd3790 100644
18971c
--- a/modules.d/98systemd/dracut-cmdline-ask.service
18971c
+++ b/modules.d/98systemd/dracut-cmdline-ask.service
18971c
@@ -16,7 +16,6 @@ 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 7f0835b4..e4797ca3 100644
18971c
--- a/modules.d/98systemd/dracut-cmdline.service
18971c
+++ b/modules.d/98systemd/dracut-cmdline.service
18971c
@@ -21,7 +21,6 @@ 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 5c014110..183f3af5 100644
18971c
--- a/modules.d/98systemd/dracut-emergency.service
18971c
+++ b/modules.d/98systemd/dracut-emergency.service
18971c
@@ -12,10 +12,8 @@ Description=Dracut Emergency Shell
18971c
 DefaultDependencies=no
18971c
 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 6340dd4d..46d041e8 100644
18971c
--- a/modules.d/98systemd/dracut-initqueue.service
18971c
+++ b/modules.d/98systemd/dracut-initqueue.service
18971c
@@ -24,7 +24,6 @@ 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 2e1e47b9..e8e33fbb 100644
18971c
--- a/modules.d/98systemd/dracut-mount.service
18971c
+++ b/modules.d/98systemd/dracut-mount.service
18971c
@@ -16,7 +16,6 @@ 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 ed67f9df..48c9b400 100644
18971c
--- a/modules.d/98systemd/dracut-pre-mount.service
18971c
+++ b/modules.d/98systemd/dracut-pre-mount.service
18971c
@@ -18,7 +18,6 @@ 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 1faeb78b..ae1f155d 100644
18971c
--- a/modules.d/98systemd/dracut-pre-pivot.service
18971c
+++ b/modules.d/98systemd/dracut-pre-pivot.service
18971c
@@ -17,7 +17,6 @@ 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 f1980368..5657450e 100644
18971c
--- a/modules.d/98systemd/dracut-pre-trigger.service
18971c
+++ b/modules.d/98systemd/dracut-pre-trigger.service
18971c
@@ -18,7 +18,6 @@ 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 7fb33044..a554eb79 100644
18971c
--- a/modules.d/98systemd/dracut-pre-udev.service
18971c
+++ b/modules.d/98systemd/dracut-pre-udev.service
18971c
@@ -21,7 +21,6 @@ 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 5c2c1c70..5da3aa31 100644
18971c
--- a/modules.d/98systemd/emergency.service
18971c
+++ b/modules.d/98systemd/emergency.service
18971c
@@ -14,21 +14,20 @@ 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
 Environment=DRACUT_SYSTEMD=1
18971c
 Environment=NEWROOT=/sysroot
18971c
 WorkingDirectory=/
18971c
-ExecStart=/bin/dracut-emergency
18971c
-ExecStopPost=-/usr/bin/systemctl --fail --no-block default
18971c
-Type=oneshot
18971c
+ExecStart=-/bin/dracut-emergency
18971c
+ExecStopPost=-/usr/bin/systemctl --no-block isolate default.target
18971c
 StandardInput=tty-force
18971c
 StandardOutput=inherit
18971c
 StandardError=inherit
18971c
 KillMode=process
18971c
 IgnoreSIGPIPE=no
18971c
+TimeoutStartSec=0
18971c
 
18971c
 # Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
18971c
 # terminates cleanly.