Changeset 2092 in MondoRescue
- Timestamp:
- Dec 17, 2008, 12:19:16 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.8/mindi/mindi
r2089 r2092 141 141 142 142 mkdir -p $bigdir/etc 143 tar cf - $mappath 2>> /dev/null| (cd $bigdir ; tar xf -) || LogIt "AKMF -- Could not copy $mappath to $bigdir"143 tar cf - $mappath 2>> $LOGFILE | (cd $bigdir ; tar xf -) || LogIt "AKMF -- Could not copy $mappath to $bigdir" 144 144 if [ "`echo $mappath | grep -F ".gz"`" ] ; then 145 145 included_list=`gzip -dc $mappath | grep -Fi include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2` … … 184 184 find $incoming/* -maxdepth 0 2> /dev/null | CopyDependenciesToDirectory $outdir 185 185 elif [ -e "$incoming" ] && [ $found = "false" ]; then 186 tar cf - $incoming 2> /dev/null| (cd $outdir ; tar xf -) || Die "Cannot copy $incoming to $outdir - did you run out of disk space?"186 tar cf - $incoming 2>> $LOGFILE | (cd $outdir ; tar xf -) || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" 187 187 188 188 # Only uncompress modules if not using udevd … … 568 568 Die "Odd." 569 569 fi 570 cp -f $MINDI_TMP/BOOTLOADER.* $bigdir 2> /dev/null|| LogIt "\nMondo v1.2x defaults to LILO as the bootloader, BTW."570 cp -f $MINDI_TMP/BOOTLOADER.* $bigdir 2>> $LOGFILE || LogIt "\nMondo v1.2x defaults to LILO as the bootloader, BTW." 571 571 if [ -e "$MINDI_TMP/NFS-DEV" ] ; then 572 572 LogIt "\nIncorporating NFS-related settings" … … 1297 1297 if [ -e "$j" ] ; then 1298 1298 LogIt "Copying $j to $k" 1299 cp -f $j $k 2> /dev/null|| Die "Failed to copy $j to $k"1300 cp -f $j $MINDI_TMP 2> /dev/null|| Die "Failed to copy $j to $MINDI_TMP"1299 cp -f $j $k 2>> $LOGFILE || Die "Failed to copy $j to $k" 1300 cp -f $j $MINDI_TMP 2>> $LOGFILE || Die "Failed to copy $j to $MINDI_TMP" 1301 1301 if [ _"$MONDO_SHARE" != _"" ]; then 1302 1302 cp -f $j $MONDO_ROOT 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_ROOT" … … 1313 1313 MakeBootConfFile isolinux > $MINDI_TMP/iso/isolinux.cfg 1314 1314 if [ "$ARCH" != "ia64" ] ; then 1315 cp $ISOLINUX $MINDI_TMP/iso/isolinux.bin 2> /dev/null|| Die "Cannot copy isolinux.bin ($ISOLINUX) to $MINDI_TMP/iso - did you run out of disk space?"1315 cp $ISOLINUX $MINDI_TMP/iso/isolinux.bin 2>> $LOGFILE || Die "Cannot copy isolinux.bin ($ISOLINUX) to $MINDI_TMP/iso - did you run out of disk space?" 1316 1316 fi 1317 1317 old_pwd=`pwd` … … 1319 1319 if [ "$ARCH" != "ia64" ] ; then 1320 1320 if [ _"$MONDO_SHARE" != _"" ]; then 1321 cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_ROOT 2> /dev/null|| Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_ROOT). Did you run out of disk space?"1321 cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_ROOT). Did you run out of disk space?" 1322 1322 cp -f $MONDO_SHARE/autorun $MINDI_TMP/iso 2>> $LOGFILE 1323 1323 fi … … 1430 1430 if [ -e "$j" ] ; then 1431 1431 LogIt "Copying $j to $k" 1432 cp -f $j $k 2> /dev/null|| Die "Failed to copy $j to $k"1433 cp -f $j $MINDI_TMP 2> /dev/null|| Die "Failed to copy $j to $MINDI_TMP"1432 cp -f $j $k 2>> $LOGFILE || Die "Failed to copy $j to $k" 1433 cp -f $j $MINDI_TMP 2>> $LOGFILE || Die "Failed to copy $j to $MINDI_TMP" 1434 1434 fi 1435 1435 done … … 1437 1437 MakeMessageFile > $MINDI_TMP/usb/message.txt 1438 1438 echo -en "." 1439 cp $kernelpath $MINDI_TMP/usb/vmlinuz 2> /dev/null|| Die "Cannot copy vmlinuz ($kernelpath) to mindi tmp ($MINDI_TMP/usb/vmlinuz). Did you run out of disk space?"1439 cp $kernelpath $MINDI_TMP/usb/vmlinuz 2>> $LOGFILE || Die "Cannot copy vmlinuz ($kernelpath) to mindi tmp ($MINDI_TMP/usb/vmlinuz). Did you run out of disk space?" 1440 1440 echo -en "." 1441 1441 cp $MINDI_TMP/initrd.img $MINDI_TMP/usb/initrd.img 2>> $LOGFILE … … 1641 1641 dd if=/dev/zero of=$mountpoint/zero bs=1k count=16 &> /dev/null 1642 1642 free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4` 1643 cp -f $kernelpath $mountpoint/vmlinuz > /dev/null 2> /dev/null1643 cp -f $kernelpath $mountpoint/vmlinuz > /dev/null 2>> $LOGFILE 1644 1644 if [ "$?" -ne "0" ] ; then 1645 1645 echo "Files at mountpoint ($mountpoint) :-" >> $LOGFILE … … 1890 1890 MakeMountlist $MINDI_TMP/mountlist.txt 1891 1891 mkdir -p $bigdir/tmp 1892 cp -f $MINDI_TMP/mountlist.txt $bigdir/tmp/mountlist.txt 2> /dev/null|| Die "Cannot copy mountlist.txt from $MINDI_TMP to data disk"1892 cp -f $MINDI_TMP/mountlist.txt $bigdir/tmp/mountlist.txt 2>> $LOGFILE || Die "Cannot copy mountlist.txt from $MINDI_TMP to data disk" 1893 1893 if [ _"$MONDO_SHARE" != _"" ]; then 1894 1894 cp -f $bigdir/tmp/mountlist.txt $MINDI_TMP/. 2>> $LOGFILE … … 1902 1902 fi 1903 1903 cat $bigdir/tmp/mountlist.txt >> $LOGFILE 1904 echo -en "$FILES_IN_FILELIST" > $bigdir/FILES-IN-FILELIST 2> /dev/null1905 echo -en "$LAST_FILELIST_NUMBER" > $bigdir/LAST-FILELIST-NUMBER 2> /dev/null1904 echo -en "$FILES_IN_FILELIST" > $bigdir/FILES-IN-FILELIST 2>> $LOGFILE 1905 echo -en "$LAST_FILELIST_NUMBER" > $bigdir/LAST-FILELIST-NUMBER 2>> $LOGFILE 1906 1906 if [ _"$MONDO_SHARE" != _"" ]; then 1907 1907 for q in filelist.full.gz biggielist.txt ; do … … 1913 1913 echo -en "Tarring and zipping the data content..." 1914 1914 size_of_all_tools=`du -sk $bigdir | cut -f1` 1915 (cd $bigdir ; tar -b 4096 -cf - . 2> /dev/null| gzip -9 > $imagesdir/all.tar.gz)1915 (cd $bigdir ; tar -b 4096 -cf - . 2>> $LOGFILE | gzip -9 > $imagesdir/all.tar.gz) 1916 1916 du -sk $imagesdir/*gz >> $LOGFILE 1917 1917 echo -e "$DONE" … … 2194 2194 fi 2195 2195 done 2196 tar cf - $mountlis `sort -u $MINDI_TMP/busy.lis` 2> /dev/null| tar xf -2196 tar cf - $mountlis `sort -u $MINDI_TMP/busy.lis` 2>> $LOGFILE | tar xf - 2197 2197 rm -f $MINDI_TMP/busy.lis 2198 2198 fi … … 2207 2207 echo "udev device manager found" > $mountpoint/tmp/USE-UDEV 2208 2208 LogIt "udev device manager found" 2209 tar cf - /etc/udev 2> /dev/null| tar xf -2209 tar cf - /etc/udev 2>> $LOGFILE | tar xf - 2210 2210 # This avoids NIC remapping if on another machine at restore time on Debian at least 2211 2211 rm -f ./etc/udev/rules.d/z??_persistent-net.rules 2212 tar cf - /lib*/udev 2> /dev/null| tar xf -2212 tar cf - /lib*/udev 2>> $LOGFILE | tar xf - 2213 2213 if [ -x /sbin/udevd ]; then 2214 2214 lis2=`grep -Ev '^#' $MINDI_CONF/udev.files` … … 2236 2236 fi 2237 2237 done 2238 tar cf - $lis `sort -u $MINDI_TMP/udev.lis` 2> /dev/null| tar xf -2238 tar cf - $lis `sort -u $MINDI_TMP/udev.lis` 2>> $LOGFILE | tar xf - 2239 2239 rm -f $MINDI_TMP/udev.lis 2240 2240 else … … 2254 2254 lis=`grep -Ev '^#' $MINDI_CACHE/tools.files` 2255 2255 LocateDeps $lis > $MINDI_TMP/tools.lis 2256 tar cf - $lis `sort -u $MINDI_TMP/tools.lis` 2> /dev/null| tar xf -2256 tar cf - $lis `sort -u $MINDI_TMP/tools.lis` 2>> $LOGFILE | tar xf - 2257 2257 fi 2258 2258 if [ -f $MINDI_CACHE/mindi-rsthw ]; then … … 2267 2267 done 2268 2268 2269 tar cf - /dev/fd0*[1,2][4,7,8]* 2> /dev/null| tar xf -2269 tar cf - /dev/fd0*[1,2][4,7,8]* 2>> $LOGFILE | tar xf - 2270 2270 2271 2271 cd $old_pwd … … 2309 2309 [ "$YOUR_KERNEL_SUCKS" ] && i=$MINDI_TMP/$i 2310 2310 echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE 2311 tar cf - $i 2> /dev/null| (cd $mountpoint ; tar xf -) || LogIt "Unable to copy $i to $mountpoint"2311 tar cf - $i 2>> $LOGFILE | (cd $mountpoint ; tar xf -) || LogIt "Unable to copy $i to $mountpoint" 2312 2312 # Uncompress modules if not using udev and native modprobe 2313 2313 if [ ! -f $mountpoint/tmp/USE-UDEV ]; then … … 2320 2320 2321 2321 # Also copy modules.dep in case of udev so that normal modprobe works 2322 tar cf - /$needed_modules_path/modules.dep 2> /dev/null| (cd $mountpoint ; tar xf -) || LogIt "Unable to copy modules.dep to $mountpoint"2322 tar cf - /$needed_modules_path/modules.dep 2>> $LOGFILE | (cd $mountpoint ; tar xf -) || LogIt "Unable to copy modules.dep to $mountpoint" 2323 2323 2324 2324 if [ ! -e "/sbin/devfsd" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then … … 2334 2334 if [ _"$MONDO_SHARE" != _"" ]; then 2335 2335 MakeMondoConfigFile $mountpoint/tmp/mondo-restore.cfg 2336 cp -f $mountpoint/tmp/mondo-restore.cfg $MINDI_TMP &> /dev/null2337 cp -f $MINDI_TMP/mountlist.txt $mountpoint/tmp/ 2> /dev/null|| Die "Cannot copy mountlist to ramdisk"2336 cp -f $mountpoint/tmp/mondo-restore.cfg $MINDI_TMP 2>> $LOGFILE || Die "Cannot copy mondo-restore.cfg to ramdisk" 2337 cp -f $MINDI_TMP/mountlist.txt $mountpoint/tmp/ 2>> $LOGFILE || Die "Cannot copy mountlist to ramdisk" 2338 2338 echo -en "$FILES_IN_FILELIST" > $mountpoint/tmp/FILES-IN-FILELIST 2339 2339 echo -en "$LAST_FILELIST_NUMBER" > $mountpoint/tmp/LAST-FILELIST-NUMBER … … 2639 2639 # Change MINDI_TMP for the one provided by mondo 2640 2640 # So that it can get back the built files 2641 mv $MINDI_TMP/* $MINDI_TMP/.??* $MONDO_TMP 2> /dev/null2641 mv $MINDI_TMP/* $MINDI_TMP/.??* $MONDO_TMP 2>> $LOGFILE 2642 2642 rmdir $MINDI_TMP 2643 2643 export MINDI_TMP=$MONDO_TMP … … 2753 2753 mkdir -p $MINDI_TMP/small-all/tmp 2754 2754 cd $MINDI_TMP/small-all 2755 cp -f $MINDI_TMP/{mountlist.txt,mondo-restore.cfg,filelist.full.gz,biggielist.txt} tmp 2> /dev/null|| Die "Cannot copy small all.tar.gz"2755 cp -f $MINDI_TMP/{mountlist.txt,mondo-restore.cfg,filelist.full.gz,biggielist.txt} tmp 2>> $LOGFILE || Die "Cannot copy small all.tar.gz" 2756 2756 tar -cv ./tmp | gzip -9 > $MINDI_TMP/all.tar.gz || Die "Cannot make small all.tar.gz" 2757 2757 sleep 2
Note:
See TracChangeset
for help on using the changeset viewer.