Changeset 3197 in MondoRescue for branches/3.2/mindi


Ignore:
Timestamp:
Oct 1, 2013, 10:25:16 AM (11 years ago)
Author:
Bruno Cornec
Message:
  • Fix a last compile error on mondoarchive (now runs till the end)
  • Trying to improve again the nightmare brought by the move to usr :-( Still not completely done, but should be better than before (solves partly the init not found issue reported and tested here as well)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3191 r3197  
    20812081    includefile=$MINDI_TMP/$$.includefile.txt
    20822082
    2083     # Check whether /lib64 or /lib is a link and if so explicitly create one in rootfs
    2084     if [ -h "/lib64" ]; then
    2085         mkdir -p lib || LogIt "ERROR: Unable to create lib in $mountpoint."
    2086         if [ ! -h lib64 ]; then
    2087             ln -s lib lib64 || LogIt "ERROR: /lib64 is a symbolic link, but I couldn't create it in $mountpoint."
    2088         fi
    2089     fi
    2090     if [ -h "/lib" ]; then
    2091         mkdir -p usr/lib || LogIt "ERROR: Unable to create usr/lib in $mountpoint."
    2092         mv lib/* usr/lib 2> /dev/null
    2093         if [ -d "lib" ]; then
    2094             rmdir lib
    2095         fi
    2096     fi
    2097     # Check whether /sbin and /bin are a link and if so explicitly create one in rootfs (Fedora 17 crazyness)
    2098     if [ -h "/sbin" ]; then
    2099         mkdir -p usr/sbin || LogIt "ERROR: Unable to create usr/sbin in $mountpoint."
    2100         mv sbin/* usr/sbin 2> /dev/null
    2101         if [ -d "sbin" ]; then
    2102             rmdir sbin
    2103         fi
    2104     fi
    2105     if [ -h "/bin" ]; then
    2106         mkdir -p usr/bin || LogIt "ERROR: Unable to create usr/bin in $mountpoint."
    2107         mv bin/* usr/bin 2> /dev/null
    2108         if [ -d "bin" ]; then
    2109             rmdir bin
    2110         fi
    2111     fi
     2083    # Check whether /lib64 or /lib or /sbin or /bin is a link and if so explicitly create one in rootfs (Fedora 17 crazyness)
     2084    for d in bin sbin lib lib64; do
     2085        if [ -h "/$d" ]; then
     2086            thelink=`readlink /$d`
     2087            mkdir -p $thelink || LogIt "ERROR: Unable to create $thelink in $mountpoint."
     2088            mv $d/* $thelink 2> /dev/null
     2089            if [ -d "$d" ]; then
     2090                rmdir $d
     2091            fi
     2092            if [ ! -h $d ]; then
     2093                ln -s $thelink $d || LogIt "ERROR: /$d is a symbolic link, but I couldn't create it in $mountpoint."
     2094            fi
     2095        fi
     2096    done
    21122097
    21132098    lfiles=`ls $DEPLIST_DIR/* | grep -v /minimal`
     
    25912576    # recent bash says that -d is true for a link to a dir !
    25922577    for f in `sort -u $MINDI_TMP/minimal.lis`; do
    2593         if [ -e $f -a ! -d $f ] || [ -h $f -a ! -d $f ]; then
     2578        if [ -e $f -a ! -d $f ] || [ -h $f ]; then
    25942579            finallist="$finallist $f"
    25952580        fi
     
    26172602        rm -f ./etc/udev/rules.d/[0-9][0-9]-persistent-net.rules
    26182603        # Do not do it if it's a link (Ubuntu 64 bits #503)
    2619         if [ -e "/lib64/udev" ] && [ ! -h "/lib64" ] && [  ! -h "/lib64/udev" ]; then
     2604        if [ -e "/lib64/udev" ] && [ ! -h "/lib64" ] && [ ! -h "/lib64/udev" ]; then
    26202605            tar cf - -C / /lib64/udev 2>> $MINDI_TMP/$$.log | tar xf -  || LogIt "ERROR: Problem in /lib64/udev analysis" $MINDI_TMP/$$.log
    26212606        fi
Note: See TracChangeset for help on using the changeset viewer.