Blame SOURCES/0121-systemd-dracut-pre-pivot-run-for-dev-nfs-root-and-cl.patch

712866
From 80f75fed99eb969e1d8ba9f16e28dec2446a7544 Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Wed, 5 Feb 2014 13:08:54 +0100
712866
Subject: [PATCH] systemd/dracut-pre-pivot: run for /dev/{nfs,root} and cleanup
712866
 /dev/nfs
712866
712866
dracut-pre-pivot was not cleaning up /dev/nfs and did not run to clean
712866
up /dev/root.
712866
---
712866
 modules.d/98systemd/dracut-pre-pivot.service | 2 ++
712866
 modules.d/98systemd/dracut-pre-pivot.sh      | 1 +
712866
 2 files changed, 3 insertions(+)
712866
712866
diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service
5c6c2a
index dd4e49b4..6db1f2c0 100644
712866
--- a/modules.d/98systemd/dracut-pre-pivot.service
712866
+++ b/modules.d/98systemd/dracut-pre-pivot.service
712866
@@ -19,6 +19,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cleanup
712866
 ConditionKernelCommandLine=|rd.break=pre-pivot
712866
 ConditionKernelCommandLine=|rd.break=cleanup
712866
 ConditionKernelCommandLine=|rd.break
712866
+ConditionPathExists=|/dev/root
712866
+ConditionPathExists=|/dev/nfs
712866
 
712866
 [Service]
712866
 Environment=DRACUT_SYSTEMD=1
712866
diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh
5c6c2a
index 8c7554ea..e62a1cec 100755
712866
--- a/modules.d/98systemd/dracut-pre-pivot.sh
712866
+++ b/modules.d/98systemd/dracut-pre-pivot.sh
712866
@@ -24,5 +24,6 @@ getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switc
712866
 
712866
 # remove helper symlink
712866
 [ -h /dev/root ] && rm -f -- /dev/root
712866
+[ -h /dev/nfs ] && rm -f -- /dev/nfs
712866
 
712866
 exit 0