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

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