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

[PATCH] Check is ld-linux.so.2 is a link before rm -rf'ing



The problem:

$ lsinitrd /srv/revisor/rawhide-i386-respin/os/i386/isolinux/initrd.img | grep ld-linux lrwxrwxrwx 1 root root 13 Feb 10 20:35 lib/ld-linux.so.2 -> ld-linux.so.2

Attached is what I think could be a solution -at least it worked for me.

-Jeroen
commit 9b992068703ff3333e259695d597785959d57d84
Author: Jeroen van Meeuwen (Fedora Unity) <kanarip fedoraunity org>
Date:   Tue Feb 10 16:32:19 2009 +0100

    Check if ld-linux.so.2 is a link already, before removing it

diff --git a/scripts/mk-images b/scripts/mk-images
index 6ab52ce..d05ff58 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -374,7 +374,7 @@ instbin() {
     done
 
     pushd $DIR/$LIBDIR
-    if [ -f ld-linux.so.2 ]; then
+    if [ -f ld-linux.so.2 -a ! -L ld-linux.so.2 ]; then
         rm -f ld-linux.so.2
         linker="$(ls -1 ld-*.*.*.so)"
         if [ -z "$linker" ]; then

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