Changeset 2166


Ignore:
Timestamp:
Mar 14, 2009, 1:39:20 AM (11 years ago)
Author:
bruno
Message:

Try to remove useless tar messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi/mindi

    r2165 r2166  
    152152
    153153    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
    155155    if [ "`echo $mappath | grep -F ".gz"`" ] ; then
    156156        included_list=`gzip -dc $mappath | grep -Fi include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`
     
    195195            find $incoming/* -maxdepth 0 2> /dev/null | CopyDependenciesToDirectory $outdir
    196196        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
    198198
    199199            # Only uncompress modules if not using udevd
     
    256256        LogIt "FATAL ERROR. $1"
    257257    fi
     258    if [ _"$2" != _"" ]; then
     259        grep -Ev "tar: Removing \`/\'" "$2" >> $LOGFILE
     260    fi
     261    rm -f "$2"
    258262
    259263    LogIt "Please e-mail a copy of $LOGFILE to the mailing list."
     
    568572            old_pwd=`pwd`
    569573            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
    571575            cd $old_pwd
    572576        fi
     
    875879    fi
    876880    echo -e "$1" >> $LOGFILE
     881    if [ _"$2" != _"" ]; then
     882        grep -Ev "tar: Removing \`/\'" "$2" >> $LOGFILE
     883    fi
     884    rm -f "$2"
    877885}
    878886
     
    18271835        cd $MINDI_TMP
    18281836        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
    18301838        done
    18311839        for i in $EXTRA_MODS ; do
     
    18331841            [ ! "$j" ] && echo "WARNING - cannot find failsafe module $i.o.gz" >> $LOGFILE
    18341842            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
    18361844                echo "Added failsafe module $k to ramdisk" >> $LOGFILE
    18371845            done
     
    18891897        [ "$?" -ne "0" ] && [ _"$MONDO_SHARE" != _"" ] && Die "Cannot find/install $MONDO_SHARE/restore-scripts"
    18901898    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
    18921900    cd $old_pwd
    18931901    echo -e "$DONE"
     
    19181926    echo -en "Tarring and zipping the data content..."
    19191927    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)
    19211929    du -sk $imagesdir/*gz >> $LOGFILE
    19221930    echo -e "$DONE"
     
    21992207            fi
    22002208        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
    22022210        rm -f $MINDI_TMP/busy.lis
    22032211    fi
     
    22152223        echo "udev device manager found" > $mountpoint/tmp/USE-UDEV
    22162224        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
    22182226        # This avoids NIC remapping if on another machine at restore time on Debian at least
    22192227        rm -f ./etc/udev/rules.d/z[0-9][0-9]_persistent-net.rules
    22202228        # This avoids NIC remapping if on another machine at restore time on Ubuntu at least
    22212229        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
    22232231        if [ -x /sbin/udevd ]; then
    22242232            lis2=`grep -Ev '^#' $MINDI_CONF/udev.files`
     
    22462254                fi
    22472255            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
    22492257            rm -f $MINDI_TMP/udev.lis
    22502258        else
     
    22642272            lis=`grep -Ev '^#' $MINDI_CACHE/tools.files`
    22652273            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
    22672275        fi
    22682276        if [ -f $MINDI_CACHE/mindi-rsthw ]; then
     
    22772285    done
    22782286
    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
    22802288
    22812289    cd $old_pwd
     
    23192327        [ "$YOUR_KERNEL_SUCKS" ] && i=$MINDI_TMP/$i
    23202328        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
    23222330        # Uncompress modules if not using udev and native modprobe
    23232331        if [ ! -f $mountpoint/tmp/USE-UDEV ]; then
     
    23302338
    23312339    # 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
    23332341
    23342342    if [ ! -e "/sbin/devfsd" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then
     
    27692777    cd $MINDI_TMP/small-all
    27702778    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
    27722780    sleep 2
    27732781    LogIt "Done. Exiting."
Note: See TracChangeset for help on using the changeset viewer.