Changeset 1914 in MondoRescue
- Timestamp:
- Apr 15, 2008, 2:24:58 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.6/mindi/mindi
r1913 r1914 40 40 TMPDIR=/tmp 41 41 42 EXTRA_SPACE= 32768# increase if you run out of ramdisk space42 EXTRA_SPACE=49152 # increase if you run out of ramdisk space 43 43 BOOT_SIZE=16384 # size of the boot disk 44 44 MAX_DISKS=99 … … 168 168 169 169 mkdir -p $bigdir/etc 170 cp --parents -pRdf $mappath $bigdir 2>> $LOGFILE || LogIt "AKMF -- Could not copy $mappath to $bigdir" 170 #cp --parents -pRdf $mappath $bigdir 2>> $LOGFILE || LogIt "AKMF -- Could not copy $mappath to $bigdir" 171 tar cf - $mappath 2>> $LOGFILE | (cd $bigdir ; tar xf -) || LogIt "AKMF -- Could not copy $mappath to $bigdir" 171 172 if [ "`echo $mappath | grep -F ".gz"`" ] ; then 172 173 included_list=`gzip -dc $mappath | grep -Fi include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2` … … 203 204 [ "`head $scratchfile -n1 | grep -F "bin/sh"`" != "" ] && StripComments $scratchfile "-$filename-" 204 205 [ "`echo "$filename" | grep -F "etc/termcap"`" != "" ] && StripComments $scratchfile "-$filename-" 205 if [ "`echo "$filename" | grep -F "lib/modules/" | grep "\.*o\.gz"`" != "" ] ; then 206 207 # Uncompress modules only if not using udevd 208 if [ "`echo "$filename" | grep -F "lib/modules/" | grep "\.*o\.gz"`" != "" ] && [ "`ps auxww | grep -v grep | grep -qw udevd`" != "" ]; then 206 209 mv $scratchfile $scratchfile.gz 207 210 gunzip -f $scratchfile || LogIt "Cannot gunzip $scratchfile.gz" … … 275 278 BIGNO=$(($BIGNO+1)) 276 279 else 277 cp --parents -Rdf $incoming $outdir 2> /dev/null || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" 278 if [ "`echo "$incoming" | grep "lib/modules/.*\..*o\.gz"`" != "" ] ; then 280 #cp --parents -Rdf $incoming $outdir 2> /dev/null || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" 281 tar cf - $incoming 2> /dev/null | (cd $outdir ; tar xf -) || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" 282 283 # Only uncompress modules if not using udevd 284 if [ "`echo "$incoming" | grep "lib/modules/.*\..*o\.gz"`" != "" ] && [ "`ps auxww | grep -v grep | grep -qw udevd`" != "" ]; then 279 285 gunzip -f $outdir/$incoming || LogIt "Cannot gunzip $outdir/$incoming" 280 286 fi … … 2059 2065 cd $MINDI_TMP 2060 2066 for i in `ListKernelModulePaths | HackPathsToFailsafe` ; do 2061 cp --parents -pRdf ./$i $bigdir 2>> $LOGFILE || Die "PDDI can't cp $i->$bigdir" 2067 #cp --parents -pRdf ./$i $bigdir 2>> $LOGFILE || Die "PDDI can't cp $i->$bigdir" 2068 tar cf - ./$i 2>> $LOGFILE | (cd $bigdir ; tar xf -) || Die "PDDI can't copy $i->$bigdir" 2062 2069 if [ "`du -sk $i | cut -f1`" -lt "$(($CHOPSIZE*2))" ] ; then 2063 cp --parents -pRdf $i $bigdir 2>> $LOGFILE 2070 #cp --parents -pRdf $i $bigdir 2>> $LOGFILE 2071 tar cf - $i 2>> $LOGFILE | (cd $bigdir ; tar xf -) 2064 2072 else 2065 2073 ChopUpAndCopyFile $i $bigdir $CHOPSIZE $BIGNO … … 2072 2080 for k in $j ; do 2073 2081 if [ "`du -sk $k | cut -f1`" -lt "$CHOPSIZE" ] ; then 2074 cp --parents -pRdf $k $bigdir 2>> $LOGFILE 2082 #cp --parents -pRdf $k $bigdir 2>> $LOGFILE 2083 tar cf - $k 2>> $LOGFILE | (cd $bigdir ; tar xf -) 2075 2084 else 2076 2085 ChopUpAndCopyFile $k $bigdir $CHOPSIZE $BIGNO … … 2131 2140 [ "$?" -ne "0" ] && [ _"$MONDO_SHARE" != _"" ] && Die "Cannot find/install $MONDO_SHARE/restore-scripts" 2132 2141 fi 2133 [ -d "/lib/dev-state" ] && cp --parents -pRdf /lib/dev-state . 2>> $LOGFILE 2142 #[ -d "/lib/dev-state" ] && cp --parents -pRdf /lib/dev-state . 2>> $LOGFILE 2143 [ -d "/lib/dev-state" ] && tar cf - /lib/dev-state 2>> $LOGFILE | tar xf - 2134 2144 cd $old_pwd 2135 2145 echo -e "$DONE" … … 2437 2447 cp -Rdf $tgz_dir_fname/* . 2>&1 >> $LOGFILE 2438 2448 tar -zxf symlinks.tgz || Die "Cannot untar symlinks.tgz" 2449 2439 2450 cd dev || Die "Can't cd to dev" 2440 2451 tar -zxf dev-entries.tgz || Die "Cannot untar dev-entries.tgz" … … 2450 2461 done 2451 2462 2452 mkdir -p tmp2453 2463 [ -e "/dev/.devfsd" ] && echo "/dev/.devfsd found" > tmp/USE-DEVFS 2454 2464 … … 2464 2474 fi 2465 2475 2476 mkdir -p $mountpoint/tmp 2466 2477 # Management of udev (which includes modprobe in rules) 2467 2478 ps auxww | grep -v grep | grep -qw udevd 2468 2479 if [ $? -eq 0 ]; then 2469 echo "udev device manager found" > tmp/USE-UDEV2480 echo "udev device manager found" > $mountpoint/tmp/USE-UDEV 2470 2481 LogIt "udev device manager found" 2471 2482 #cp --parents -Rdf /etc/udev . 2> /dev/null … … 2506 2517 echo "udevd daemon not in standard place (/sbin)" 2>&1 | tee -a $LOGFILE 2507 2518 echo "mindi will use static devices which may cause problems" 2>&1 | tee -a $LOGFILE 2508 rm -f tmp/USE-UDEV2519 rm -f $mountpoint/tmp/USE-UDEV 2509 2520 fi 2510 2521 fi … … 2579 2590 needed_modules="$needed_modules `FindSpecificModuleInPath $needed_modules_path $i`" 2580 2591 done 2592 2581 2593 for i in $needed_modules ; do 2582 2594 [ -e "$i" ] && s=`du -sk $i | cut -f1` || s="" … … 2585 2597 #cp --parents -Rpdf $i $mountpoint 2>/dev/null || LogIt "Unable to copy $i to $mountpoint" 2586 2598 tar cf - $i 2>/dev/null | (cd $mountpoint ; tar xf -) || LogIt "Unable to copy $i to $mountpoint" 2587 # Uncompress modules if not us eing udev and native modprobe2599 # Uncompress modules if not using udev and native modprobe 2588 2600 if [ ! -f $mountpoint/tmp/USE-UDEV ]; then 2589 2601 if [ "`echo "$i" | grep -F ".gz"`" ]; then 2602 echo "Uncompressing $i" >> $LOGFILE 2590 2603 gunzip -f $mountpoint/$i 2591 #i=`echo $i | sed 's/.gz//'`2592 2604 fi 2593 2605 fi … … 2598 2610 tar cf - /$needed_modules_path/modules.dep 2>/dev/null | (cd $mountpoint ; tar xf -) || LogIt "Unable to copy modules.dep to $mountpoint" 2599 2611 2600 # For all modules supported, create symlinks under the mountpoint2601 for i in $EXTRA_MODS $NET_MODS $SCSI_MODS; do2602 all_modules="$all_modules `FindSpecificModuleInPath $mountpoint $i | sed 's~^$mountpoint/~~g'`"2603 done2604 2612 if [ ! -e "/sbin/devfsd" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then 2605 2613 echo "Deleting devfsd daemon from ramdisk" >> $LOGFILE … … 2612 2620 dd if=/dev/zero of=$mountpoint/zero &> /dev/null 2613 2621 rm -f $mountpoint/zero 2614 mkdir -p $mountpoint/tmp2615 2622 if [ _"$MONDO_SHARE" != _"" ]; then 2616 2623 MakeMondoConfigFile $mountpoint/tmp/mondo-restore.cfg
Note:
See TracChangeset
for help on using the changeset viewer.