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

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