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

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

 



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@xxxxxxxxxxxxxxx>
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
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux