[PATCH 11/10] dracut: sewing fixup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


We accidentally tried to make upwards symlinks when directories existed.

Signed-off-by: Michal Soltys <soltys@xxxxxxxx>
---
 dracut |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dracut b/dracut
index 4cfcab8..72af2c0 100755
--- a/dracut
+++ b/dracut
@@ -543,7 +543,9 @@ else
 fi
 # initial sewing pass
 for d in "${initdir}${imgdir}"/*; do
-    ln -sfn "${imgdir#/}/${d##*/}" "${initdir}/${d##*/}"
+    if [[ ! -e "${initdir}/${d##*/}" ]]; then
+        ln -sfn "${imgdir#/}/${d##*/}" "${initdir}/${d##*/}"
+    fi
 done
 
 # check all our modules to see if they should be sourced.
@@ -684,7 +686,7 @@ for d in "${initdir}${imgdir}"/*; do
             dfatal "dracut: symlink mismatch ${d##*/} -/-> ${d#${initdir}/}"
             exit 1
         fi
-    else
+    elif [[ ! -e ${s} ]]; then
         ln -sfn "${d#${initdir}/}" "${s}"
     fi
 done
-- 
1.7.5.3

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Home]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux