Changeset 3204 in MondoRescue for branches/3.2


Ignore:
Timestamp:
Dec 6, 2013, 3:40:43 PM (10 years ago)
Author:
Bruno Cornec
Message:
  • Fix mindi support for /bin,/sbin,/lib symlinks to /usr. Works on Mageia 3 at least. Still some error msgs are reported in logs but are harmless
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3201 r3204  
    910910    if [ -h "$d" ]; then
    911911        echo "$d"
    912         echo "$d/`basename $file`"
    913912        d2=`readlink $d`
    914913        c2=`echo $d2 | cut -c1`
     
    920919            fi
    921920        fi
     921        echo "$d/`basename $file`"
    922922    fi
    923923    if [ "$fchar" != "/" ]; then
     
    25452545    # Copy of files mandatory for ssh to automate mount if sshfs is used
    25462546    mkdir $mountpoint/.ssh
    2547     cp -rp ~root/.ssh/* $mountpoint/.ssh 2> /dev/null
     2547    cp -a ~root/.ssh/* $mountpoint/.ssh 2> /dev/null
    25482548    echo > $mountpoint/tmp/myssh << EOF
    25492549ssh -o StrictHostKeyChecking=no $*
     
    25522552
    25532553    # Copy of files mandatory for ld.so
    2554     cp -rp /etc/ld.so.c* $mountpoint/etc
     2554    cp -a /etc/ld.so.c* $mountpoint/etc
    25552555
    25562556    # Handle the case where busybox and mount are dynamically linked
     
    25742574    # Initial / are trucated by tar
    25752575    finallist=""
    2576     # Remove directories from the list, as tar will create them anyway
     2576    # Remove directories from the list, as tar/cp will create them anyway
    25772577    # and it may hurt if /lib is in it as on Debian/Ubuntu
    25782578    # recent bash says that -d is true for a link to a dir !
     
    25832583    done
    25842584    #tar cf - $finallist 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "WARNING: Problem in minimal analysis" $MINDI_TMP/$$.log
    2585     cp -a --parents $finallist . 2>> $MINDI_TMP/$$.log || LogIt "WARNING: Problem in minimal analysis" $MINDI_TMP/$$.log
     2585    echo "cp -a -n --parents $finallist -t $mountpoint" 2>&1 >> $MINDI_TMP/$$.log
     2586    cp -a -n --parents $finallist -t $mountpoint 2>> $MINDI_TMP/$$.log || LogIt "WARNING: Problem in minimal analysis" $MINDI_TMP/$$.log
    25862587
    25872588    # To improve support for distribution scripts, we now prefer to use bash as the std shell. Also fixes #600
     
    26002601        LogIt "INFO: udev device manager found"
    26012602        tar cf - -C / /etc/udev 2>> $MINDI_TMP/$$.log | tar xf -  || LogIt "ERROR: Problem in /etc/udev analysis" $MINDI_TMP/$$.log
    2602         # This avoids NIC remapping if on another machine at restore time on Debian at least
    2603         rm -f ./etc/udev/rules.d/z[0-9][0-9]_persistent-net.rules
    2604         # This avoids NIC remapping if on another machine at restore time on Ubuntu at least
    2605         rm -f ./etc/udev/rules.d/[0-9][0-9]-persistent-net.rules
     2603        # This avoids NIC remapping if on another machine at restore time on Debian/Ubuntu at least
     2604        rm -f ./etc/udev/rules.d/[z]*[0-9][0-9][-_]persistent-net.rules
    26062605        # Do not do it if it's a link (Ubuntu 64 bits #503)
    26072606        if [ -e "/lib64/udev" ] && [ ! -h "/lib64" ] && [ ! -h "/lib64/udev" ]; then
     
    26242623                    while [ -h $j ]; do
    26252624                        lis="$lis $j"
    2626                         j=`readlink $j`
     2625                        j=`readlink -f $j`
    26272626                    done
    26282627                    lis="$lis $j"
     
    26382637                    [ "$j" != "" ] && rm -f $j
    26392638                fi
     2639                echo "$i" >> $MINDI_TMP/udev.lis
    26402640            done
    26412641            #tar cf - -C / $lis `sort -u $MINDI_TMP/udev.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "ERROR: Problem in udev.lis analysis" $MINDI_TMP/$$.log
    2642             cp --parents -a $lis `sort -u $MINDI_TMP/udev.lis` 2>> $MINDI_TMP/$$.log $mountpoint/  || LogIt "ERROR: Problem in udev.lis analysis" $MINDI_TMP/$$.log
     2642            echo "cp -a -n --parents `sort -u $MINDI_TMP/udev.lis` -t $mountpoint/" 2>&1 >> $MINDI_TMP/$$.log
     2643            cp -a -n --parents `sort -u $MINDI_TMP/udev.lis` -t $mountpoint/ 2>> $MINDI_TMP/$$.log  || LogIt "ERROR: Problem in udev.lis analysis" $MINDI_TMP/$$.log
    26432644            rm -f $MINDI_TMP/udev.lis
    26442645        else
Note: See TracChangeset for help on using the changeset viewer.