Changeset 2715 in MondoRescue for branches/2.2.10/mindi/mindi
- Timestamp:
- Feb 2, 2011, 1:18:23 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mindi/mindi
r2708 r2715 222 222 223 223 mkdir -p $bigdir/etc 224 tar cf - -C / $mappath 2>> $MINDI_TMP/$$.log | (cd $bigdir; tar xf -) || LogAll "AKMF -- Could not copy $mappath to $bigdir" $MINDI_TMP/$$.log224 tar cf - -C / $mappath 2>> $MINDI_TMP/$$.log | (cd "$bigdir" ; tar xf -) || LogAll "AKMF -- Could not copy $mappath to $bigdir" $MINDI_TMP/$$.log 225 225 if [ "`echo $mappath | grep -F ".gz"`" ] ; then 226 226 included_list=`gzip -dc $mappath | grep -Fi include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2` … … 266 266 find $incoming/* -maxdepth 0 2> /dev/null | CopyDependenciesToDirectory $outdir 0 267 267 elif [ -e "$incoming" ] && [ $found = "false" ]; then 268 tar cf - -C / $incoming 2>> $MINDI_TMP/$$.log | (cd $outdir; tar xf -) || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" $MINDI_TMP/$$.log268 tar cf - -C / $incoming 2>> $MINDI_TMP/$$.log | (cd "$outdir" ; tar xf -) || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" $MINDI_TMP/$$.log 269 269 270 270 # Only uncompress modules if not using udevd … … 468 468 fi 469 469 # Find all files and links (required for some VMWare VMs) 470 modpaths=`find $1-name $2.*o -o -name $2.o.gz -o -name $2.ko.gz -o -name $2 -type f -o -type l`470 modpaths=`find "$1" -name $2.*o -o -name $2.o.gz -o -name $2.ko.gz -o -name $2 -type f -o -type l` 471 471 echo "$modpaths" 472 472 } … … 580 580 LogAll "\nIncorporating post-nuke tarball" 581 581 old_pwd=`pwd` 582 cd $bigdir582 cd "$bigdir" 583 583 tar -zxf $MINDI_TMP/post-nuke.tgz 2>> $MINDI_TMP/$$.log || LogAll "Error occurred when untarring post-nuke tarball" $MINDI_TMP/$$.log 584 cd $old_pwd584 cd "$old_pwd" 585 585 fi 586 586 cp -f $MINDI_TMP/BOOTLOADER.* $bigdir 2>> $LOGFILE || LogAll "\nMondo v1.2x defaults to LILO as the bootloader, BTW." … … 1408 1408 fi 1409 1409 old_pwd=`pwd` 1410 cd $MINDI_TMP/iso1410 cd "$MINDI_TMP/iso" 1411 1411 LogFile "-------------------" 1412 1412 LogFile "Content of the ISO:" … … 1437 1437 fi 1438 1438 rm -f $MINDI_TMP/mkisofs.log 1439 cd $old_pwd1439 cd "$old_pwd" 1440 1440 } 1441 1441 … … 1783 1783 echo -en "Kernel size = `du -sk $kernelpath | cut -f1` K\nRamdisk free = $free_space K\n" >> $LOGFILE 1784 1784 [ "$mountpoint" != "" ] && rm -f $mountpoint/vmlinuz 1785 cd $old_pwd1785 cd "$old_pwd" 1786 1786 umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)" 1787 1787 rmdir $mountpoint || LogAll "Cannot rmdir (PBDI)" … … 1894 1894 1895 1895 old_pwd=`pwd` 1896 cd $bigdir1896 cd "$bigdir" 1897 1897 1898 1898 # Get terminfo content … … 1909 1909 tar cf - -C / ./lib/dev-state 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Unable to handle /lib/dev-state" $MINDI_TMP/$$.log 1910 1910 fi 1911 cd $old_pwd1911 cd "$old_pwd" 1912 1912 echo -e "$DONE" 1913 1913 TOTAL_BIGDIR_SIZE=`du -sk $bigdir | cut -f1` … … 1929 1929 echo -en "Tarring and zipping the data content..." 1930 1930 size_of_all_tools=`du -sk $bigdir | cut -f1` 1931 (cd $bigdir; tar -b 4096 -cf - . 2>> $MINDI_TMP/$$.log | gzip -9 > $imagesdir/all.tar.gz || LogAll "Problem creating all.tar.gz" $MINDI_TMP/$$.log)1931 (cd "$bigdir" ; tar -b 4096 -cf - . 2>> $MINDI_TMP/$$.log | gzip -9 > $imagesdir/all.tar.gz || LogAll "Problem creating all.tar.gz" $MINDI_TMP/$$.log) 1932 1932 LogFile "Size of the data content" 1933 1933 LogFile "------------------------" … … 2340 2340 fi 2341 2341 2342 cd $old_pwd2342 cd "$old_pwd" 2343 2343 if [ _"$MONDO_SHARE" != _"" ]; then 2344 2344 MakeMondoConfigFile $MINDI_CACHE/mondorestore.cfg … … 2403 2403 LogFile "Content of initial ramdisk:" 2404 2404 LogFile "---------------------------" 2405 (cd $mountpoint; ls -Rla ) >> $LOGFILE2405 (cd "$mountpoint" ; ls -Rla ) >> $LOGFILE 2406 2406 LogFile "---------------------------" 2407 2407 … … 2414 2414 LogFile "Creating an $gvFileSystem initrd image..." 2415 2415 # kernel expects linuxrc in ext2 filesystem 2416 ( cd $mountpoint&& ln -sf sbin/init linuxrc )2416 ( cd "$mountpoint" && ln -sf sbin/init linuxrc ) 2417 2417 # unmount loop filesystem and create image file using the standard approach 2418 2418 umount $mountpoint || Die "Cannot unmount $tempfile" … … 2430 2430 which cpio &> /dev/null; [ $? -eq 0 ] || Die "cpio not found. Please install package cpio and try again." 2431 2431 # go into filesystem 2432 cd $mountpoint2432 cd "$mountpoint" 2433 2433 # kernel expects init in cpio filesystem 2434 2434 ln -sf sbin/init init 2435 2435 # create cpio image file and unmount loop filesystem 2436 2436 find . -print | cpio -o -H newc | gzip -9 > $rdz_fname 2> /dev/null 2437 cd $old_pwd2437 cd "$old_pwd" 2438 2438 umount $mountpoint || Die "Cannot unmount $tempfile" 2439 2439 # log that we are done
Note:
See TracChangeset
for help on using the changeset viewer.