Changeset 3766 in MondoRescue
- Timestamp:
- Jun 17, 2020, 2:10:41 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi/mindi
r3764 r3766 63 63 # If "yes", mindi will modify isolinux.cfg for the Xen kernel. 64 64 xenkernelpath="" 65 65 66 66 MY_FSTAB=/etc/fstab 67 67 TAPE_MODS="ht st osst ide-tape ide_tape" … … 179 179 # Should be declared here as used immediately below potentialy 180 180 MindiExit() { 181 LogFile "INFO: Mindi $MINDI_VERSION is exiting" 182 LogFile "INFO: End date : `date`" 181 LogFile "INFO: Mindi $MINDI_VERSION is exiting" 182 LogFile "INFO: End date : `date`" 183 183 if [ _"$MONDO_SHARE" != _"" ] ; then 184 184 echo "------------- mindi logfile included -------------------------" >> /var/log/mondoarchive.log … … 380 380 rmdir $outdir$resolved > /dev/null 2> /dev/null 381 381 ln -sf $vanilla_resolved_name $outdir$resolved 382 LogFile "INFO: Excluding deps $resolved" 382 LogFile "INFO: Excluding deps $resolved" 383 383 grep -Fvx "$resolved" "$filelist" > $filelist.tmp 384 LogFile "INFO: Replacing it with $vanilla_resolved_name" 384 LogFile "INFO: Replacing it with $vanilla_resolved_name" 385 385 echo "$vanilla_resolved_name" >> $filelist.tmp 386 386 mv -f $filelist.tmp $filelist … … 526 526 [ ! -e "$LDLINUXC32" ] && LDLINUXC32=/usr/lib64/syslinux/modules/bios/ldlinux.c32 527 527 #[ ! -e "$LDLINUXC32" ] && LDLINUXC32=`find / -name ldlinux.c32 | grep -x "/.*/ldlinux.c32"` 528 if [ ! -e "$LDLINUXC32" ]; then 528 if [ ! -e "$LDLINUXC32" ]; then 529 529 LogFile "INFO: If you use syslinux 5.x, you may miss ldlinux.c32. If your syslinux RPM doesn't include ldlinux.c32, you may want to download another one" 530 530 LDLINUXC32=/tmp/itdoesntexist … … 811 811 lvUseFilesystem="cramfs" 812 812 else 813 # In that case, we are most probably after 2.6.30 and use the supported initramfs 813 # In that case, we are most probably after 2.6.30 and use the supported initramfs 814 814 LogFile "WARNING: No automatic detection found previously. Supposing initramfs." 815 815 LogFile "WARNING: Report on the MondoRescue mailing-list with your log files and the result of" … … 829 829 # $1: raid device (/dev/md...) 830 830 GetRaidDevMembers() { 831 if [ ! -f /etc/raidtab ]; then 831 if [ ! -f /etc/raidtab ]; then 832 832 return 833 833 fi … … 885 885 886 886 # 887 # Critical function which computes all dependencies (dyn. lib.) 887 # Critical function which computes all dependencies (dyn. lib.) 888 888 # for a list of binaries 889 889 # … … 905 905 fi 906 906 else 907 deps="$deps $fname" 907 deps="$deps $fname" 908 908 fi 909 909 done … … 953 953 LogProgress() { 954 954 local i progress modres noof_lines title 955 955 956 956 progress=$1 957 957 noof_lines=$2 … … 965 965 fi 966 966 967 if [ _"$MONDO_SHARE" != _"" ]; then 967 if [ _"$MONDO_SHARE" != _"" ]; then 968 968 echo "$title $i%" 969 969 else … … 1140 1140 1141 1141 # 3rd try, which works on a standard partition (ext2/3), but not on swap 1142 # For LVM gives a /dev/mapper entry 1142 # For LVM gives a /dev/mapper entry 1143 1143 if [ "x$actual_dev" = "x" ]; then 1144 1144 actual_dev=`/bin/mount -l | grep "\[$redhat_label\]" | cut -d' ' -f1` 1145 1145 fi 1146 1146 1147 # 4th try, with vol_id 1147 # 4th try, with vol_id 1148 1148 # SWAP only 1149 1149 if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ]; then … … 1220 1220 fi 1221 1221 1222 # 3th try, with vol_id 1222 # 3th try, with vol_id 1223 1223 if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ]; then 1224 1224 list_dev=`mount | grep -E '^/' | $AWK '{ print $1 }' ` … … 1316 1316 # the former is then a link to the latter, so we test whether 1317 1317 # $current_partition is actually such a link or not and set 1318 # $current_lvolume accordingly. On Debian you may find more than one answer 1318 # $current_lvolume accordingly. On Debian you may find more than one answer 1319 1319 # so we remove the one corresponding to /dev/.static 1320 1320 # On RedHat even if the device name is different (/dev/mapper/<VG><LV>), the … … 1338 1338 fi 1339 1339 fi 1340 # 1340 # 1341 1341 # End of LVM device style variation code (other than $current_lvolume). 1342 1342 … … 1453 1453 fi 1454 1454 done 1455 LogAll "-----------------------------------" 1455 LogAll "-----------------------------------" 1456 1456 1457 1457 # Manages potential btrfs subvol partitions so they can be restored … … 1476 1476 sep=`btrfs subvolume list -a / | grep FS_TREE | sed 's/.*<FS_TREE>\/\(.*\)/\1/'` 1477 1477 echo "btrfs subvolume create /mnt/RESTORING/$sep" >> $MINDI_TMP/create-btrfs-subvol 1478 while read dev mp type opt dum dum; do 1478 while read dev mp type opt dum dum; do 1479 1479 echo $dev | grep -qE 'UUID|LABEL' 1480 1480 if [ $? -eq 0 ]; then … … 1596 1596 cp -f $j $k 2>> $LOGFILE || LogAll "Failed to copy $j to $k" 1597 1597 cp -f $j $MINDI_TMP 2>> $LOGFILE || LogAll "Failed to copy $j to $MINDI_TMP" 1598 if [ _"$MONDO_SHARE" != _"" ]; then 1598 if [ _"$MONDO_SHARE" != _"" ]; then 1599 1599 cp -f $j $MONDO_ROOT 2>> $LOGFILE || LogAll "Failed to copy $j to $MONDO_ROOT" 1600 1600 fi … … 1643 1643 if [ "$ARCH" != "ia64" ] ; then 1644 1644 if [ $KERNEL_IS_XEN = "yes" ]; then 1645 FindMboot32Binary 1645 FindMboot32Binary 1646 1646 cp $xenkernelpath $MINDI_TMP/target/xen.gz 2>> $LOGFILE 1647 1647 if [ $? -ne 0 ] ; then … … 1659 1659 MakeMessageFile $MINDI_TMP/target/$tbc | cut -c1-80 > $MINDI_TMP/target/$tbc/message.txt 1660 1660 1661 if [ _"$MONDO_SHARE" != _"" ]; then 1661 if [ _"$MONDO_SHARE" != _"" ]; then 1662 1662 cp -rf $MINDI_TMP/target/$tbc $MONDO_ROOT 2>> $LOGFILE 1663 1663 if [ $? -ne 0 ] ; then … … 2412 2412 cp -Rdf $MONDO_SHARE/restore-scripts/etc/* $bigdir/etc 2>> $LOGFILE 2413 2413 fi 2414 if [ -d "/lib/dev-state" ]; then 2414 if [ -d "/lib/dev-state" ]; then 2415 2415 cp -a /lib/dev-state $bigdir/lib/ 2>> $MINDI_TMP/$$.log || LogAll "ERROR: Unable to handle /lib/dev-state" $MINDI_TMP/$$.log 2416 2416 fi … … 2428 2428 fi 2429 2429 if [ $LVM != "false" ]; then 2430 $MINDI_LIB/analyze-my-lvm > $bigdir/tmp/i-want-my-lvm 2430 $MINDI_LIB/analyze-my-lvm > $bigdir/tmp/i-want-my-lvm 2431 2431 if [ $? -ne 0 ]; then 2432 2432 LVM="false" … … 2757 2757 rdz_fname=$MINDI_TMP/initrd.img 2758 2758 kernelsize=`du -sk $kernelpath | cut -f1` 2759 res=0 2759 res=0 2760 2760 templog=$MINDI_TMP/$$.log 2761 2761 > $templog … … 2820 2820 2821 2821 # Handle the case where busybox and mount are dynamically linked 2822 file $MINDI_LIB/rootfs/usr/bin/busybox 2>&1 | grep -q "dynamically" 2822 file $MINDI_LIB/rootfs/usr/bin/busybox 2>&1 | grep -q "dynamically" 2823 2823 if [ $? -eq 0 ]; then 2824 2824 # We want to use the real mount and all the supported variants (nfs, cifs, ...) … … 2890 2890 cp -rp $MINDI_CACHE/bkphw $targetdir 2891 2891 if [ -f $MINDI_CACHE/tools.files ]; then 2892 lis=`grep -Ev '^#' $MINDI_CACHE/tools.files` 2892 lis=`grep -Ev '^#' $MINDI_CACHE/tools.files` 2893 2893 LocateDeps $lis > $MINDI_TMP/tools.lis 2894 2894 tar cf - $lis `sort -u $MINDI_TMP/tools.lis` 2> $templog | (cd $targetdir ; tar xf -) || LogAll "ERROR: Problem in tools.lis analysis" $templog … … 3307 3307 MODULES="$MODULES `/usr/sbin/esxcfg-module -l | $AWK '{print $1}'`" 3308 3308 fi 3309 LogFile "-------------" 3309 LogFile "-------------" 3310 3310 LogFile "FORCE_MODS:" 3311 3311 LogFile "-------------" … … 3413 3413 3414 3414 # 3415 # If we have a USB device we need to store info 3415 # If we have a USB device we need to store info 3416 3416 # and remove it from the parameters line 3417 3417 #
Note:
See TracChangeset
for help on using the changeset viewer.