Changeset 2166 in MondoRescue
- Timestamp:
- Mar 14, 2009, 1:39:20 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi/mindi
r2165 r2166 152 152 153 153 mkdir -p $bigdir/etc 154 tar cf - -C / $mappath 2>> $ LOGFILE | (cd $bigdir ; tar xf -) || LogIt "AKMF -- Could not copy $mappath to $bigdir"154 tar cf - -C / $mappath 2>> $MINDI_TMP/$$.log | (cd $bigdir ; tar xf -) || LogIt "AKMF -- Could not copy $mappath to $bigdir" $MINDI_TMP/$$.log 155 155 if [ "`echo $mappath | grep -F ".gz"`" ] ; then 156 156 included_list=`gzip -dc $mappath | grep -Fi include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2` … … 195 195 find $incoming/* -maxdepth 0 2> /dev/null | CopyDependenciesToDirectory $outdir 196 196 elif [ -e "$incoming" ] && [ $found = "false" ]; then 197 tar cf - -C / $incoming 2>> $ LOGFILE | (cd $outdir ; tar xf -) || Die "Cannot copy $incoming to $outdir - did you run out of disk space?"197 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 198 198 199 199 # Only uncompress modules if not using udevd … … 256 256 LogIt "FATAL ERROR. $1" 257 257 fi 258 if [ _"$2" != _"" ]; then 259 grep -Ev "tar: Removing \`/\'" "$2" >> $LOGFILE 260 fi 261 rm -f "$2" 258 262 259 263 LogIt "Please e-mail a copy of $LOGFILE to the mailing list." … … 568 572 old_pwd=`pwd` 569 573 cd $bigdir 570 tar -zxf $MINDI_TMP/post-nuke.tgz || LogIt "Error occurred when untarring post-nuke tarball"574 tar -zxf $MINDI_TMP/post-nuke.tgz 2>> $MINDI_TMP/$$.log || LogIt "Error occurred when untarring post-nuke tarball" $MINDI_TMP/$$.log 571 575 cd $old_pwd 572 576 fi … … 875 879 fi 876 880 echo -e "$1" >> $LOGFILE 881 if [ _"$2" != _"" ]; then 882 grep -Ev "tar: Removing \`/\'" "$2" >> $LOGFILE 883 fi 884 rm -f "$2" 877 885 } 878 886 … … 1827 1835 cd $MINDI_TMP 1828 1836 for i in `ListKernelModulePaths | HackPathsToFailsafe` ; do 1829 tar cf - ./$i 2>> $ LOGFILE | (cd $bigdir ; tar xf -) || Die "PDDI can't copy $i->$bigdir"1837 tar cf - ./$i 2>> $MINDI_TMP/$$.log | (cd $bigdir ; tar xf -) || Die "PDDI can't copy $i->$bigdir" $MINDI_TMP/$$.log 1830 1838 done 1831 1839 for i in $EXTRA_MODS ; do … … 1833 1841 [ ! "$j" ] && echo "WARNING - cannot find failsafe module $i.o.gz" >> $LOGFILE 1834 1842 for k in $j ; do 1835 tar cf - $k 2>> $ LOGFILE | (cd $bigdir ; tar xf -)1843 tar cf - $k 2>> $MINDI_TMP/$$.log | (cd $bigdir ; tar xf -) || LogIt "ERROR on module $k" $MINDI_TMP/$$.log 1836 1844 echo "Added failsafe module $k to ramdisk" >> $LOGFILE 1837 1845 done … … 1889 1897 [ "$?" -ne "0" ] && [ _"$MONDO_SHARE" != _"" ] && Die "Cannot find/install $MONDO_SHARE/restore-scripts" 1890 1898 fi 1891 [ -d "/lib/dev-state" ] && tar cf - -C / /lib/dev-state 2>> $ LOGFILE | tar xf -1899 [ -d "/lib/dev-state" ] && tar cf - -C / /lib/dev-state 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "Unable to handle /lib/dev-state" $MINDI_TMP/$$.log 1892 1900 cd $old_pwd 1893 1901 echo -e "$DONE" … … 1918 1926 echo -en "Tarring and zipping the data content..." 1919 1927 size_of_all_tools=`du -sk $bigdir | cut -f1` 1920 (cd $bigdir ; tar -b 4096 -cf - . 2>> $ LOGFILE | gzip -9 > $imagesdir/all.tar.gz)1928 (cd $bigdir ; tar -b 4096 -cf - . 2>> $MINDI_TMP/$$.log | gzip -9 > $imagesdir/all.tar.gz || LogIt "Problem creating all.tar.gz" $MINDI_TMP/$$.log) 1921 1929 du -sk $imagesdir/*gz >> $LOGFILE 1922 1930 echo -e "$DONE" … … 2199 2207 fi 2200 2208 done 2201 tar cf - $mountlis `sort -u $MINDI_TMP/busy.lis` 2>> $ LOGFILE | tar xf -2209 tar cf - $mountlis `sort -u $MINDI_TMP/busy.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "Problem in mount analysis" $MINDI_TMP/$$.log 2202 2210 rm -f $MINDI_TMP/busy.lis 2203 2211 fi … … 2215 2223 echo "udev device manager found" > $mountpoint/tmp/USE-UDEV 2216 2224 LogIt "udev device manager found" 2217 tar cf - -C / /etc/udev 2>> $ LOGFILE | tar xf -2225 tar cf - -C / /etc/udev 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "Problem in /etc/udev analysis" $MINDI_TMP/$$.log 2218 2226 # This avoids NIC remapping if on another machine at restore time on Debian at least 2219 2227 rm -f ./etc/udev/rules.d/z[0-9][0-9]_persistent-net.rules 2220 2228 # This avoids NIC remapping if on another machine at restore time on Ubuntu at least 2221 2229 rm -f ./etc/udev/rules.d/[0-9][0-9]-persistent-net.rules 2222 tar cf - -C / /lib*/udev 2>> $ LOGFILE | tar xf -2230 tar cf - -C / /lib*/udev 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "Problem in /lib/udev analysis" $MINDI_TMP/$$.log 2223 2231 if [ -x /sbin/udevd ]; then 2224 2232 lis2=`grep -Ev '^#' $MINDI_CONF/udev.files` … … 2246 2254 fi 2247 2255 done 2248 tar cf - -C / $lis `sort -u $MINDI_TMP/udev.lis` 2>> $ LOGFILE | tar xf -2256 tar cf - -C / $lis `sort -u $MINDI_TMP/udev.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "Problem in udev.lis analysis" $MINDI_TMP/$$.log 2249 2257 rm -f $MINDI_TMP/udev.lis 2250 2258 else … … 2264 2272 lis=`grep -Ev '^#' $MINDI_CACHE/tools.files` 2265 2273 LocateDeps $lis > $MINDI_TMP/tools.lis 2266 tar cf - $lis `sort -u $MINDI_TMP/tools.lis` 2>> $ LOGFILE | tar xf -2274 tar cf - $lis `sort -u $MINDI_TMP/tools.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "Problem in tools.lis analysis" $MINDI_TMP/$$.log 2267 2275 fi 2268 2276 if [ -f $MINDI_CACHE/mindi-rsthw ]; then … … 2277 2285 done 2278 2286 2279 tar cf - -C / /dev/fd0*[1,2][4,7,8]* 2>> $ LOGFILE | tar xf -2287 tar cf - -C / /dev/fd0*[1,2][4,7,8]* 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "Problem in fd dev analysis" $MINDI_TMP/$$.log 2280 2288 2281 2289 cd $old_pwd … … 2319 2327 [ "$YOUR_KERNEL_SUCKS" ] && i=$MINDI_TMP/$i 2320 2328 echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE 2321 tar cf - -C / $i 2>> $ LOGFILE | (cd $mountpoint ; tar xf -) || LogIt "Unable to copy $i to $mountpoint"2329 tar cf - -C / $i 2>> $MINDI_TMP/$$.log | (cd $mountpoint ; tar xf -) || LogIt "Unable to copy $i to $mountpoint" $MINDI_TMP/$$.log 2322 2330 # Uncompress modules if not using udev and native modprobe 2323 2331 if [ ! -f $mountpoint/tmp/USE-UDEV ]; then … … 2330 2338 2331 2339 # Also copy modules.dep in case of udev so that normal modprobe works 2332 tar cf - -C / /$needed_modules_path/modules.dep 2>> $ LOGFILE | (cd $mountpoint ; tar xf -) || LogIt "Unable to copy modules.dep to $mountpoint"2340 tar cf - -C / /$needed_modules_path/modules.dep 2>> $MINDI_TMP/$$.log | (cd $mountpoint ; tar xf -) || LogIt "Unable to copy modules.dep to $mountpoint" $MINDI_TMP/$$.log 2333 2341 2334 2342 if [ ! -e "/sbin/devfsd" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then … … 2769 2777 cd $MINDI_TMP/small-all 2770 2778 cp -f $MINDI_TMP/{mountlist.txt,mondo-restore.cfg,filelist.full.gz,biggielist.txt} tmp 2>> $LOGFILE || Die "Cannot copy small all.tar.gz" 2771 tar -cv ./tmp | gzip -9 > $MINDI_TMP/all.tar.gz || Die "Cannot make small all.tar.gz"2779 tar -cv ./tmp | gzip -9 > $MINDI_TMP/all.tar.gz 2>> $MINDI_TMP/$$.log || Die "Cannot make small all.tar.gz" $MINDI_TMP/$$.log 2772 2780 sleep 2 2773 2781 LogIt "Done. Exiting."
Note:
See TracChangeset
for help on using the changeset viewer.