Changeset 3204 in MondoRescue
- Timestamp:
- Dec 6, 2013, 3:40:43 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi/mindi
r3201 r3204 910 910 if [ -h "$d" ]; then 911 911 echo "$d" 912 echo "$d/`basename $file`"913 912 d2=`readlink $d` 914 913 c2=`echo $d2 | cut -c1` … … 920 919 fi 921 920 fi 921 echo "$d/`basename $file`" 922 922 fi 923 923 if [ "$fchar" != "/" ]; then … … 2545 2545 # Copy of files mandatory for ssh to automate mount if sshfs is used 2546 2546 mkdir $mountpoint/.ssh 2547 cp - rp~root/.ssh/* $mountpoint/.ssh 2> /dev/null2547 cp -a ~root/.ssh/* $mountpoint/.ssh 2> /dev/null 2548 2548 echo > $mountpoint/tmp/myssh << EOF 2549 2549 ssh -o StrictHostKeyChecking=no $* … … 2552 2552 2553 2553 # Copy of files mandatory for ld.so 2554 cp - rp/etc/ld.so.c* $mountpoint/etc2554 cp -a /etc/ld.so.c* $mountpoint/etc 2555 2555 2556 2556 # Handle the case where busybox and mount are dynamically linked … … 2574 2574 # Initial / are trucated by tar 2575 2575 finallist="" 2576 # Remove directories from the list, as tar will create them anyway2576 # Remove directories from the list, as tar/cp will create them anyway 2577 2577 # and it may hurt if /lib is in it as on Debian/Ubuntu 2578 2578 # recent bash says that -d is true for a link to a dir ! … … 2583 2583 done 2584 2584 #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 2586 2587 2587 2588 # To improve support for distribution scripts, we now prefer to use bash as the std shell. Also fixes #600 … … 2600 2601 LogIt "INFO: udev device manager found" 2601 2602 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 2606 2605 # Do not do it if it's a link (Ubuntu 64 bits #503) 2607 2606 if [ -e "/lib64/udev" ] && [ ! -h "/lib64" ] && [ ! -h "/lib64/udev" ]; then … … 2624 2623 while [ -h $j ]; do 2625 2624 lis="$lis $j" 2626 j=`readlink $j`2625 j=`readlink -f $j` 2627 2626 done 2628 2627 lis="$lis $j" … … 2638 2637 [ "$j" != "" ] && rm -f $j 2639 2638 fi 2639 echo "$i" >> $MINDI_TMP/udev.lis 2640 2640 done 2641 2641 #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 2643 2644 rm -f $MINDI_TMP/udev.lis 2644 2645 else
Note:
See TracChangeset
for help on using the changeset viewer.