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