Changeset 2446 in MondoRescue
- Timestamp:
- Oct 2, 2009, 4:30:13 AM (14 years ago)
- Location:
- branches/2.2.10
- Files:
-
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mindi/mindi
r2445 r2446 35 35 36 36 EXTRA_SPACE=60000 # increase if you run out of ramdisk space 37 BOOT_SIZE= 16384# size of the boot disk37 BOOT_SIZE=24576 # size of the boot disk 38 38 39 39 PROMPT_MAKE_CD_IMAGE="yes" … … 272 272 273 273 DropOptimizedLibraries() { 274 local outdir filelist list_of_optimized_libraries optimized_lib_name vanilla_lib_name reason msg resolved res 274 local outdir filelist list_of_optimized_libraries optimized_lib_name vanilla_lib_name reason msg resolved res progress 275 275 filelist=$1 276 276 outdir=$2 277 277 278 progress=0 278 279 list_of_optimized_libraries=`grep "lib/i[5-7]86/" $filelist` 279 280 if [ "$list_of_optimized_libraries" = "" ] ; then 280 281 return 0 282 else 283 noof_lines=`echo $list_of_optimized_libraries | tr ' ' '\n' | wc -l` 281 284 fi 282 285 echo -en "Dropping i686-optimized libraries if appropriate" 283 286 for optimized_lib_name in $list_of_optimized_libraries ; do 284 echo -en "."285 287 reason="" 286 288 vanilla_lib_name=`echo "$optimized_lib_name" | sed -e 's/i[5-7]86//' -e 's/cmov//' -e 's/nosegneg//' | tr -s '/' '/'` … … 303 305 mv -f $filelist.tmp $filelist 304 306 done 307 progress=$(($progress+1)) 308 LogProgress $progress $noof_lines 305 309 done 306 310 $AWK '{ print $1; }' $filelist | sort -u > $filelist.tmp … … 794 798 # Give all symlinks recursively of a full path name 795 799 ReadAllLink() { 796 file="$1" 797 798 echo $file | grep -q '\.\./' 799 if [ $? -eq 0 ]; then 800 # We need to normalise the path with .. in it 801 file=`echo $file | perl -pi -e 's|([^/]+)/([^/]+)/\.\./([^/]+)|$1/$3|'` 802 fi 803 echo "$file" 804 if [ ! -h $file ]; then 805 return 0 806 fi 807 808 link=`readlink $file` 809 d=`dirname $file` 810 fchar=`echo $link | cut -c1` 811 # If mother dir is a link print it 812 if [ -h "$d" ]; then 813 echo "$d" 814 d=`readlink $d` 815 fi 816 if [ "$fchar" != "/" ]; then 817 # Relative or local link 818 ReadAllLink "$d/$link" 819 else 820 # Absolute path 821 ReadAllLink $link 822 fi 800 801 incoming="$*" 802 803 for file in $incoming ; do 804 echo "$file" 805 if [ ! -h $file ]; then 806 continue 807 fi 808 809 link=`readlink -e $file` 810 d=`dirname $file` 811 fchar=`echo $link | cut -c1` 812 # If mother dir is a link print it 813 if [ -h "$d" ]; then 814 echo "$d" 815 d=`readlink -e $d` 816 fi 817 if [ "$fchar" != "/" ]; then 818 # Relative or local link 819 ReadAllLink "$d/$link" 820 else 821 # Absolute path 822 ReadAllLink $link 823 fi 824 done 823 825 } 824 826 … … 2242 2244 # We need a minimal conf in the initial ramdisk 2243 2245 mountlis=`grep -v "^#.*" $DEPLIST_FILE_MIN $DEPLIST_DIR/minimal*.conf | cut -d: -f2 | sort -u` 2244 LocateDeps $mountlis >> $MINDI_TMP/busy.lis 2246 ReadAllLink $mountlis > $MINDI_TMP/mnt.lis 2247 LocateDeps `cat $MINDI_TMP/mnt.lis` >> $MINDI_TMP/deps.lis 2245 2248 # Special for libs 2246 for f in `grep -E "/lib" $DEPLIST_FILE_MIN $DEPLIST_DIR/minimal*.conf | grep -v "^#.*" | cut -d: -f2`; do 2247 echo "`ReadAllLink $f`" >> $MINDI_TMP/busy.lis 2248 done 2249 ReadAllLink `grep -E "/lib" $DEPLIST_FILE_MIN $DEPLIST_DIR/minimal*.conf | grep -v "^#.*" | cut -d: -f2` >> $MINDI_TMP/deps.lis 2250 2249 2251 # Initial / are trucated by tar 2250 tar cf - $mountlis `sort -u $MINDI_TMP/busy.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in mount analysis" $MINDI_TMP/$$.log2251 rm -f $MINDI_TMP/ busy.lis2252 tar cf - `cat $MINDI_TMP/mnt.lis` `sort -u $MINDI_TMP/deps.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in mount analysis" $MINDI_TMP/$$.log 2253 rm -f $MINDI_TMP/deps.lis 2252 2254 2253 2255 # Copy of files mandatory for ssh to automate mount if sshfs is used … … 2270 2272 if [ $? -eq 0 ]; then 2271 2273 echo "udev device manager found" > $mountpoint/tmp/USE-UDEV 2272 Log All"udev device manager found"2274 LogFile "udev device manager found" 2273 2275 tar cf - -C / /etc/udev 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in /etc/udev analysis" $MINDI_TMP/$$.log 2274 2276 # This avoids NIC remapping if on another machine at restore time on Debian at least … … 2287 2289 while [ -h $j ]; do 2288 2290 lis="$lis $j" 2289 j=`readlink $j`2291 j=`readlink -f $j` 2290 2292 done 2291 2293 lis="$lis $j" … … 2486 2488 LogFile "$ARCH architecture detected" 2487 2489 LogFile "mindi called with the following arguments:" 2488 LogFile "$ @"2490 LogFile "$*" 2489 2491 LogFile "Start date : `date`" 2490 2492 LogFile "-----------------------------" … … 2695 2697 elif [ "$1" = "--readalllink" ] ; then 2696 2698 [ ! "$2" ] && Die "Please specify the binary to look at" 2697 ReadAllLink $2 2699 shift 2700 ReadAllLink $* 2698 2701 # Avoids logfile content for mondo 2699 2702 export MONDO_SHARE="" -
branches/2.2.10/mindi/mindi-bkphw
r2445 r2446 89 89 close(SCRIPT); 90 90 } else { 91 print " WARNING: No Hardware support for $productname. Not a big issue, just less features and risks ;-)\n";91 print "\nWARNING: No Hardware support for $productname. Not a big issue, just less features and risks ;-)\n"; 92 92 print "You may ask your manufacturer to contribute to the mindi project\n"; 93 93 } -
branches/2.2.10/mondo/src/common/libmondo-devices.c
r2444 r2446 1634 1634 log_msg(4, "I guess it's a partiion itself"); 1635 1635 mr_asprintf(partitions[0], "%s", dsf); 1636 ndsf = truncate_to_drive_name(dsf); 1636 mr_asprintf(tmp, "%s", dsf); 1637 ndsf = truncate_to_drive_name(tmp); 1638 mr_free(tmp); 1637 1639 } else { 1638 1640 /* Fill the partition list */ … … 1828 1830 mount_list = call_program_and_get_last_line_of_output(command); 1829 1831 mr_free(command); 1830 :w! 1832 1831 1833 log_msg(4, " Software raid device list: %s", mount_list); 1832 1834 /* Loop through the software raid device list to see if we can find the partition */
Note:
See TracChangeset
for help on using the changeset viewer.