Changeset 963 in MondoRescue


Ignore:
Timestamp:
Nov 23, 2006, 4:21:46 PM (17 years ago)
Author:
Bruno Cornec
Message:

Better output messages for mindi

Location:
branches/stable/mindi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/analyze-my-lvm

    r911 r963  
    3737Die() {
    3838    echo "$1" >> /dev/stderr
    39     exit 1
     39    exit -1
    4040}
    4141
     
    217217
    218218# -------------------------------- main -----------------------------------
    219 which lvmdiskscan 2>/dev/null 2>&1 || Die "Cannot find lvmdiskscan. Are you sure you're using LVM?"
     219which lvmdiskscan 2>/dev/null 2>&1 || Die "lvmdiskscan not found. Won't handle LVM."
    220220if [ -e "/proc/lvm/global" ] && [ "`tr -s '\t' ' ' < /proc/lvm/global | grep "0 VGs 0 PVs 0 LVs"`" != "" ] ; then
    221221    exit 0
  • branches/stable/mindi/mindi

    r960 r963  
    178178    if [ ! -e "$filename" ] ; then
    179179        if [ -h "$filename" ] ; then
    180             cp --parents -pRdf $filename $minidir_root/$diskno
     180            cp --parents -pRdf $filename $minidir_root/$diskno 2>> $LOGFILE
    181181            return $noof_disks
    182182        else
     
    189189        mkdir -p $minidir_root/$diskno
    190190        filesize=`du -sk $filename | cut -f1`
    191         cp --parents -Rdf $filename $minidir_root/$diskno
     191        cp --parents -Rdf $filename $minidir_root/$diskno 2>> $LOGFILE
    192192        if [ "$filesize" -le "4" ] ; then
    193193            siz=$filesize
     
    228228        mappath=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep "$locale[^r][^/]" | grep -vx " *#.*"`
    229229        if [ ! -e "$mappath" ] ; then
    230             LogIt "Cannot add $mappath: kbd map file not found\n"
     230            LogIt "Cannot add $mappath: kbd map file not found"
    231231            return
    232232        fi
     
    236236
    237237    mkdir -p $bigdir/etc
    238     cp --parents -pRdf $mappath $bigdir || LogIt "AKMF -- Could not copy $mappath to $bigdir\n"
     238    cp --parents -pRdf $mappath $bigdir 2>> $LOGFILE || LogIt "AKMF -- Could not copy $mappath to $bigdir"
    239239    if [ "`echo $mappath | grep -F ".gz"`" ] ; then
    240240        included_list=`gzip -dc $mappath | grep -Fi include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`
     
    268268    sliceno=0
    269269    scratchfile=$MINDI_TMP/blah.$$.dat
    270     cp -f $filename $scratchfile || Die "CUACF -- cannot copy $filename to $scratchfile - did you run out of disk space?"
     270    cp -f $filename $scratchfile 2>> $LOGFILE || Die "CUACF -- cannot copy $filename to $scratchfile - did you run out of disk space?"
    271271    [ "`head $scratchfile -n1 | grep -F "bin/sh"`" != "" ] && StripComments $scratchfile "-$filename-"
    272272    [ "`echo "$filename" | grep -F "etc/termcap"`" != "" ] && StripComments $scratchfile "-$filename-"
    273273    if [ "`echo "$filename" | grep -F "lib/modules/" | grep "\.*o\.gz"`" != "" ] ; then
    274274        mv $scratchfile $scratchfile.gz
    275         gunzip -f $scratchfile || LogIt "Cannot gunzip $scratchfile.gz\n"
     275        gunzip -f $scratchfile || LogIt "Cannot gunzip $scratchfile.gz"
    276276        filename=`echo "$filename" | tr '.' '#' | sed s/#o#gz/#o/ | sed s/#ko#gz/#ko/ | tr '#' '.'`
    277277    fi
     
    282282    [ -x "$scratchfile" ] && StripExecutable $scratchfile "-$filename-"
    283283    while [ "$sliceno" -le "$noof_slices" ] ; do
    284         dd if=$scratchfile skip=$(($sliceno*$slicesize)) of=$outdir/slice-$biggienumber.`printf "%03d" $sliceno` bs=1k count=$slicesize 2> /dev/null
     284        dd if=$scratchfile skip=$(($sliceno*$slicesize)) of=$outdir/slice-$biggienumber.`printf "%03d" $sliceno` bs=1k count=$slicesize &> /dev/null
    285285        sliceno=$(($sliceno+1))
    286286    done
     
    297297    if [ $liloc ]; then
    298298        if ! [ `strings $liloc | grep "boot\.b"` ]; then
    299             LogIt "boot.b files built into lilo; I'll create a dummy.\n"
     299            LogIt "boot.b files built into lilo; I'll create a dummy."
    300300            > $copy_to
    301301            return 0
     
    306306        copy_from=`grep install= /etc/lilo.conf | grep "\.b" | cut -d'=' -f2`
    307307        if [ ! -f "$copy_from" ] ; then
    308             LogIt "Nor can I find it from your /etc/lilo.conf file. This is very odd.\n"
     308            LogIt "Nor can I find it from your /etc/lilo.conf file. This is very odd."
    309309            copy_from=`FindSensibleBootBFile`
    310             LogIt "I'm going to use '$copy_from'\n"
    311         fi
    312     fi
    313     cp -f $copy_from $copy_to || LogIt "CBBF -- warning -- cannot find your boot.b file. That's it, I quit... (j/k)\n"
     310            LogIt "I'm going to use '$copy_from'"
     311        fi
     312    fi
     313    cp -f $copy_from $copy_to 2>> $LOGFILE || LogIt "CBBF -- warning -- cannot find your boot.b file. That's it, I quit... (j/k)"
    314314}
    315315
     
    332332                cp --parents -Rdf $incoming $outdir 2> /dev/null || Die "Cannot copy $incoming to $outdir - did you run out of disk space?"
    333333                if [ "`echo "$incoming" | grep "lib/modules/.*\..*o\.gz"`" != "" ] ; then
    334                     gunzip -f $outdir/$incoming || LogIt "Cannot gunzip $outdir/$incoming\n"
     334                    gunzip -f $outdir/$incoming || LogIt "Cannot gunzip $outdir/$incoming"
    335335                fi
    336336                [ -x "$outdir" ] && StripExecutable $outdir "-$filename-"
     
    376376    done
    377377    echo -e "$DONE"
    378     LogIt "$comment has been written.\n"
     378    LogIt "$comment has been written."
    379379}
    380380
     
    401401    while [ "$diskno" -le "$noof_disks" ] ; do
    402402        echo -en "#$diskno..."
    403         cp -f $tardir/$diskno.tar.gz $outdir || LogIt "[line 424] Cannot copy $tardir/$diskno.tar.gz to $outdir\n"
     403        cp -f $tardir/$diskno.tar.gz $outdir 2>> $LOGFILE || LogIt "[line 424] Cannot copy $tardir/$diskno.tar.gz to $outdir"
    404404        CreateOneDataDiskImage $tardir/$diskno.tar.gz $outdir/mindi-data-$diskno.img $diskno $noof_disks
    405405        diskno=$(($diskno+1))
     
    421421    mountpoint=$MINDI_TMP/mountpoint.$$
    422422    mkdir -p $mountpoint
    423     dd if=/dev/zero of=$imagefile bs=1k count=1440 &> /dev/null || LogIt "Cannot dd (CODI)\n"
     423    dd if=/dev/zero of=$imagefile bs=1k count=1440 &> /dev/null || LogIt "Cannot dd (CODI)"
    424424    mke2fs -N 12 -F $imagefile > $MINDI_TMP/mke2fs.$$ 2>> $MINDI_TMP/mke2fs.$$
    425425    [ "$?" -ne "0" ] && cat $MINDI_TMP/mke2fs.$$
     
    432432    fi
    433433    [ "$diskno" -eq "$noof_disks" ] && echo "This is the last disk ($diskno=$noof_disks)" >> $mountpoint/LAST-DISK
    434     umount $mountpoint || LogIt "Cannot umount (CODI)\n"
    435     rmdir $mountpoint || LogIt "Cannot rmdir (CODI)\n"
     434    umount $mountpoint || LogIt "Cannot umount (CODI)"
     435    rmdir $mountpoint || LogIt "Cannot rmdir (CODI)"
    436436}
    437437
     
    470470    local i
    471471    if [ "$1" = "" ] ; then
    472         LogIt "Fatal error\n"
    473     else
    474         LogIt "Fatal error. $1\n"
     472        LogIt "FATAL ERROR"
     473    else
     474        LogIt "FATAL ERROR. $1"
    475475    fi
    476476
    477477    # Creates a tar file containing all required files
    478478    for i in /etc/fstab /etc/lilo.conf /etc/raidtab $LOGFILE /var/log/mondo-archive.log ; do
    479         [ -e "$i" ] && cp -f $i $MINDI_TMP
     479        [ -e "$i" ] && cp -f $i $MINDI_TMP 2>> $LOGFILE
    480480    done
    481481    rm -f $TMPDIR/mindi.err.*.tgz
    482482    tar -cf - $MINDI_TMP | gzip -9 > $TMPDIR/mindi.err.$$.tgz
    483     LogIt "Please e-mail a copy of $TMPDIR/mindi.err.$$.tgz to the mailing list.\n"
    484     LogIt "See http://www.mondorescue.org for more information.\n"
     483    LogIt "Please e-mail a copy of $TMPDIR/mindi.err.$$.tgz to the mailing list."
     484    LogIt "See http://www.mondorescue.org for more information."
    485485    LogIt "WE CANNOT HELP unless you enclose that file.\n"
    486486    MindiExit -1
     
    524524FindAndAddUserKeyboardMappingFile() {
    525525    local r res mapfile mappath included_item included_list keyfile mp locale
    526     LogIt "Analyzing your keyboard's configuration.\n"
     526    LogIt "Analyzing your keyboard's configuration."
    527527    KEYDIR=/lib/kbd
    528528    [ ! -e "$KEYDIR" ] && KEYDIR=/usr/share/kbd     # Slackware
     
    530530    [ ! -e "$KEYDIR" ] && KEYDIR=/usr/share
    531531    if [ ! -e "$KEYDIR" ] ; then
    532         LogIt "Keyboard mapping directory not found. I shall use default map at boot-time.\n"
     532        LogIt "Keyboard mapping directory not found. I shall use default map at boot-time."
    533533        return 0
    534534    fi
     
    549549        KBDEPTH=0
    550550        mkdir -p $bigdir/etc/console
    551         cp /etc/console/boottime.kmap.gz $bigdir/etc/console
     551        cp /etc/console/boottime.kmap.gz $bigdir/etc/console 2>> $LOGFILE
    552552        echo -e "$DONE"
    553553        return 0
     
    556556        keyfile=`find /etc -name rc.config | head -n1`
    557557        if [ "$keyfile" = "" ] || [ ! -e "$keyfile" ] ; then
    558             LogIt "Unknown config detected. Default keyboard map will be used.\n"
     558            LogIt "Unknown config detected. Default keyboard map will be used."
    559559            return
    560560        else
     
    563563    fi
    564564    if [ ! -e "$KEYDIR/keymaps" ] ; then
    565         LogIt "Keyboard mapping directory not found. Default keyboard map will be used.\n"
     565        LogIt "Keyboard mapping directory not found. Default keyboard map will be used."
    566566        return
    567567    fi
     
    587587    echo "mappath = $mappath" >> $LOGFILE
    588588    if [ ! -e "$mappath" ] || [ -d "$mappath" ] ; then
    589         LogIt "Keyboard mapping file not found. Default keyboard map will be used.\n"
     589        LogIt "Keyboard mapping file not found. Default keyboard map will be used."
    590590        return
    591591    fi
     
    625625        if which lilo.real > /dev/null 2> /dev/null ; then
    626626            LILO_EXE=lilo.real
    627             LogIt "lilo.real found; will be used instead of lilo (*grumble* *mutter*)\n"
     627            LogIt "lilo.real found; will be used instead of lilo (*grumble* *mutter*)"
    628628        else
    629629            LILO_EXE=lilo
     
    679679    fi
    680680    if [ ! -e "$1" ] ; then
    681         LogIt "Warning - cannot search specific path '$1'\n"
     681        LogIt "WARNING - cannot search specific path '$1'"
    682682        return 1
    683683    fi
     
    714714        filelist=`GenerateListForFile "$incoming"`
    715715        r=$?
    716         [ "$r" -ne "0" ] && LogIt "$incoming not found\n"
     716        [ "$r" -ne "0" ] && LogIt "$incoming not found"
    717717        res=$(($res+$r))
    718718#       echo "'$incoming' generates filelist '$filelist'" >> $LOGFILE
     
    821821        mkdir -p $bigdir/bin
    822822        if [ -e "$MINDI_TMP/post-nuke.tgz" ] ; then
    823             LogIt "\nIncorporating post-nuke tarball\n"
     823            LogIt "\nIncorporating post-nuke tarball"
    824824            old_pwd=`pwd`
    825825            cd $bigdir
    826             tar -zxf $MINDI_TMP/post-nuke.tgz || LogIt "Error occurred when untarring post-nuke tarball\n"
     826            tar -zxf $MINDI_TMP/post-nuke.tgz || LogIt "Error occurred when untarring post-nuke tarball"
    827827            cd $old_pwd
    828828        fi
    829         if cp -f $MINDI_TMP/mondo*restore $bigdir/usr/bin ; then
     829        if cp -f $MINDI_TMP/mondo*restore $bigdir/usr/bin 2>> $LOGFILE ; then
    830830            LocateDeps $bigdir/usr/bin/mondo*restore >> $outfile.pre
    831831        else
    832             LogIt "Cannot find mondo*restore in mondo's tempdir, $MINDI_TMP\n"
    833             LogIt "I bet you've got a spare copy of Mondo or Mindi floating around on your system.\n"
     832            LogIt "Cannot find mondo*restore in mondo's tempdir, $MINDI_TMP"
     833            LogIt "I bet you've got a spare copy of Mondo or Mindi floating around on your system."
    834834            LogIt "If Mindi was called by Mondo then send me a bug report.\n It not, type 'ps ax' to see which Mondo-related process is still running;\n then kill it. :-)\n Finally, run Mindi again."
    835835            Die "Odd."
    836836        fi
    837         cp -f $MINDI_TMP/BOOTLOADER.* $bigdir 2> /dev/null || LogIt "\nMondo v1.2x defaults to LILO as the bootloader, BTW.\n"
     837        cp -f $MINDI_TMP/BOOTLOADER.* $bigdir 2> /dev/null || LogIt "\nMondo v1.2x defaults to LILO as the bootloader, BTW."
    838838        if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    839             LogIt "Incorporating NFS-related settings\n"
     839            LogIt "Incorporating NFS-related settings"
    840840            for r in NFS-* ISO-PREFIX ; do
    841                 cp -f $MINDI_TMP/$r $bigdir/tmp || Die "Cannot copy $r - did you run out of disk space?"
     841                cp -f $MINDI_TMP/$r $bigdir/tmp 2>> $LOGFILE || Die "Cannot copy $r - did you run out of disk space?"
    842842                echo "Copying $r to ramdisk" >> $LOGFILE
    843843            done
     
    972972    for fname in $incoming ; do
    973973        if [ ! -e "$fname" ] ; then
    974             echo "Warning - $fname does not exist; cannot be LDD'd." >> $LOGFILE
     974            echo "WARNING - $fname does not exist; cannot be LDD'd." >> $LOGFILE
    975975            if echo $fname | grep lvm &> /dev/null ; then
    976976                echo "This warning only affects you if you are using LVM." >> $LOGFILE
     
    11881188        echo -en "\rAnalyzing LVM...\r"
    11891189        all_partitions=`$MINDI_LIB/analyze-my-lvm | grep -F ">>>" | cut -d' ' -f2-32`
     1190        if [ $? -eq -1 ]; then
     1191            LVM="false"
     1192        fi
    11901193    fi
    11911194    all_partitions="$all_partitions `ListAllPartitions 2> /dev/null`"
     
    12361239                # For LVM FS it will give a /dev/dm-# which should then be converted
    12371240                if [ $LVM = "v2" ] && [ "`echo $actual_dev | grep '/dev/dm'`" ]; then
    1238                     major=`/bin/ls -l $actual_dev | awk '{print $5}'`
    1239                     minor=`/bin/ls -l $actual_dev | awk '{print $6}'`
     1241                    major=`/bin/ls -l $actual_dev | $AWK '{print $5}'`
     1242                    minor=`/bin/ls -l $actual_dev | $AWK '{print $6}'`
    12401243                    for dev in `ls /dev/mapper/*`; do
    1241                         major1=`/bin/ls -l $dev | awk '{print $5}'`
    1242                         minor1=`/bin/ls -l $dev | awk '{print $6}'`
     1244                        major1=`/bin/ls -l $dev | $AWK '{print $5}'`
     1245                        minor1=`/bin/ls -l $dev | $AWK '{print $6}'`
    12431246                        if [ $major1 = $major ] && [ $minor1 = $minor ]; then
    1244                             actual_dev=`/bin/ls -l $dev | awk '{print $10}'`
     1247                            actual_dev=`/bin/ls -l $dev | $AWK '{print $10}'`
    12451248                            break
    12461249                        fi
     
    12581261            # SWAP only
    12591262            if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ]; then
    1260                 list_swaps=`cat /proc/swaps | /bin/grep "/dev/" | /bin/awk '{ print $1 }' `
     1263                list_swaps=`cat /proc/swaps | /bin/grep "/dev/" | $AWK '{ print $1 }' `
    12611264                for dev_swap in $list_swaps ; do
    12621265                    dev_exists=`/sbin/vol_id $dev_swap | /bin/grep "$redhat_label"`
     
    12761279                    do
    12771280                        # Location of the swap label for kernel 2.6
    1278                         try_dev_label=`dd bs=1 count=16 skip=1052 if=$try_dev 2> /dev/null`
     1281                        try_dev_label=`dd bs=1 count=16 skip=1052 if=$try_dev &> /dev/null`
    12791282                        if [ "x$try_dev_label" = "x$redhat_label" ]; then
    12801283                            actual_dev=$try_dev
     
    13011304                # For LVM FS it will give a /dev/dm-# which should then be converted
    13021305                if [ $LVM = "v2" ] && [ "`echo $actual_dev | grep '/dev/dm'`" ]; then
    1303                     major=`/bin/ls -l $actual_dev | awk '{print $5}'`
    1304                     minor=`/bin/ls -l $actual_dev | awk '{print $6}'`
     1306                    major=`/bin/ls -l $actual_dev | $AWK '{print $5}'`
     1307                    minor=`/bin/ls -l $actual_dev | $AWK '{print $6}'`
    13051308                    for dev in `ls /dev/mapper/*`; do
    1306                         major1=`/bin/ls -l $dev | awk '{print $5}'`
    1307                         minor1=`/bin/ls -l $dev | awk '{print $6}'`
     1309                        major1=`/bin/ls -l $dev | $AWK '{print $5}'`
     1310                        minor1=`/bin/ls -l $dev | $AWK '{print $6}'`
    13081311                        if [ $major1 = $major ] && [ $minor1 = $minor ]; then
    1309                             actual_dev=`/bin/ls -l $dev | awk '{print $10}'`
     1312                            actual_dev=`/bin/ls -l $dev | $AWK '{print $10}'`
    13101313                            break
    13111314                        fi
     
    13161319            # 3th try, with vol_id
    13171320            if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ]; then
    1318                 list_dev=`mount | /bin/grep -E '^/' | /bin/awk '{ print $1 }' `
     1321                list_dev=`mount | /bin/grep -E '^/' | $AWK '{ print $1 }' `
    13191322                for dev in $list_dev ; do
    13201323                    dev_exists=`/sbin/vol_id $dev | /bin/grep "$uuid"`
     
    13301333                current_partition=$actual_dev
    13311334            else
    1332                 Die "Your system uses a UUID partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in /etc/fstab or install findfs|blkid|vol_id\n"
     1335                Die "Your system uses a UUID partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in /etc/fstab or install findfs|blkid|vol_id"
    13331336            fi
    13341337        else
     
    14281431                partition_format="compaq"
    14291432            elif [ ! "`grep -F device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then
    1430                 LogIt "Unable to find mountpoint of $current_partition - ignoring\n"
     1433                LogIt "Unable to find mountpoint of $current_partition - ignoring"
    14311434                continue
    14321435            fi
    14331436        fi
    14341437        partition_format="`echo "$partition_format" | cut -d',' -f1`"; # in case user has ext3,ext2 or something dumb like that
    1435         [ "$partition_format" = "auto" ] && partition_format="`mount | grep -w $current_partition | awk '{print$5;}'`"; # in case user uses 'auto' (dumb!)
     1438        [ "$partition_format" = "auto" ] && partition_format="`mount | grep -w $current_partition | $AWK '{print$5;}'`"; # in case user uses 'auto' (dumb!)
    14361439        unofficial_outstring=`printf "\t%-15s %-15s %-15s %7s\n" $current_partition $partition_mountpt $partition_format $psz`
    14371440        if [ "$current_partition" = "" ] ; then
     
    15181521            old_pwd=`pwd`
    15191522            cd $minidir_root/$old_diskno
    1520             cp --parents -Rdf $filename $minidir_root/$d/ || Die "Can't move $filename (sensibly) from $old_diskno to $d"
     1523            cp --parents -Rdf $filename $minidir_root/$d/ 2>> $LOGFILE || Die "Can't move $filename (sensibly) from $old_diskno to $d"
    15211524            rm -f $filename
    15221525            cd $old_pwd
     
    15691572    fi
    15701573    if [ ! "$MINDI_TMP" ] ; then
    1571         LogIt "NB: Mindi's bootable CD always uses isolinux.\n"
    1572         LogIt "For a bootable CD w/LILO, please use Mondo.\n"
     1574        LogIt "NB: Mindi's bootable CD always uses isolinux."
     1575        LogIt "For a bootable CD w/LILO, please use Mondo."
    15731576    fi
    15741577    rm -Rf $MINDI_TMP/iso
    15751578    mkdir -p $MINDI_TMP/iso/{images,archives,isolinux}
    1576     cp -f $1/*.img $1/*.gz $MINDI_TMP/iso/images || LogIt "OfferToMakeBootableISO: Cannot copy $i to $MINDI_TMP/iso/images\n"
     1579    cp -f $1/*.img $1/*.gz $MINDI_TMP/iso/images 2>> $LOGFILE || LogIt "OfferToMakeBootableISO: Cannot copy $i to $MINDI_TMP/iso/images"
    15771580    old_pwd=`pwd`
    15781581    cd $MINDI_TMP/iso
     
    15831586        k=$MINDI_TMP/iso/isolinux
    15841587        if [ -e "$j" ] ; then
    1585             LogIt "Copying $j to $k\n"
     1588            LogIt "Copying $j to $k"
    15861589            cp -f $j $k 2> /dev/null || Die "Failed to copy $j to $k"
    15871590            cp -f $j $MINDI_TMP 2> /dev/null || Die "Failed to copy $j to $MINDI_TMP"
     
    15911594    MakeSyslinuxMessageFile $MINDI_TMP/iso/isolinux/message.txt
    15921595    cp $kernelpath $MINDI_TMP/iso/isolinux/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_ROOT/isolinux/vmlinuz). Did you run out of disk space?"
    1593     cp $MINDI_TMP/mindi.rdz $MINDI_TMP/iso/isolinux/initrd.img
    1594     cp $MINDI_TMP/mindi.rdz $CACHE_LOC/initrd.img
     1596    cp $MINDI_TMP/mindi.rdz $MINDI_TMP/iso/isolinux/initrd.img 2>> $LOGFILE
     1597    cp $MINDI_TMP/mindi.rdz $CACHE_LOC/initrd.img 2>> $LOGFILE
    15951598    [ -e "$iso_cfg_file" ] || Die "FIXME - unable to find $iso_cfg_file - this should never occur"
    15961599    cd $MINDI_TMP/iso/isolinux
     
    16021605    if [ "$ARCH" != "ia64" ] ; then
    16031606        cp $ISOLINUX isolinux.bin 2> /dev/null || Die "Cannot copy isolinux.bin ($ISOLINUX) to tmp_root - did you run out of disk space?"
    1604         cp $ISOLINUX ../
     1607        cp $ISOLINUX ../ 2>> $LOGFILE
    16051608    fi
    16061609    cd $MINDI_TMP/iso
     
    16081611        cp -f $MINDI_TMP/iso/isolinux/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_ROOT 2> /dev/null || Die "Cannot copy core files to ramdisk for boot disk. Did you run out of disk space?"
    16091612    fi
    1610     [ "$MONDO_SHARE" ] && cp -f $MONDO_SHARE/autorun .   
     1613    [ "$MONDO_SHARE" ] && cp -f $MONDO_SHARE/autorun .    2>> $LOGFILE
    16111614    if [ "$ARCH" != "ia64" ] ; then
    16121615        mkisofs -U -J -r -o $CACHE_LOC/mindi.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table . > /dev/null 2> $MINDI_TMP/mkisofs.log
     
    16191622        echo "mkisofs returned the following errors:-"
    16201623        cat $MINDI_TMP/mkisofs.log
    1621         LogIt "Failed to create ISO image.\n"
     1624        LogIt "Failed to create ISO image."
    16221625    else
    16231626        echo "Created bootable ISO image at $CACHE_LOC/mindi.iso" >> $LOGFILE
     
    16741677    image=$MINDI_TMP/$rand1.$rand2.img
    16751678    mtpt=$MINDI_TMP/$rand1.$rand2.mtpt
    1676     dd if=/dev/zero of=$image bs=1k count=$disksize
     1679    dd if=/dev/zero of=$image bs=1k count=$disksize &> /dev/null
    16771680    mke2fs -N 26 -F $image > /dev/null
    16781681    mkdir -p $mtpt
     
    16801683    cd $mtpt
    16811684    mkdir -p {dev,tmp,boot}
    1682     cp -f $1 vmlinuz
     1685    cp -f $1 vmlinuz 2>> $LOGFILE
    16831686    if [ "$?" -ne "0" ] ; then
    1684         LogIt "Failed to copy $1 to ramdisk\n"
     1687        LogIt "Failed to copy $1 to ramdisk"
    16851688        cd $old_pwd
    16861689        umount $mtpt
     
    16941697    rdev -r vmlinuz 49152
    16951698
    1696     tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz\n"
     1699    tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz"
    16971700    losetup /dev/loop0 > /dev/null 2> /dev/null
    1698     [ "$?" -eq "0" ] || losetup /dev/loop0 -d || Die "Please free up /dev/loop0 by typing 'losetup /dev/loop0 -d'.\nReboot if necessary.\n"
     1701    [ "$?" -eq "0" ] || losetup /dev/loop0 -d || Die "Please free up /dev/loop0 by typing 'losetup /dev/loop0 -d'.\nReboot if necessary."
    16991702    CopyBootBFile $mtpt/boot.b
    17001703
     
    18201823    [ "$?" -ne "0" ] && cat $MINDI_TMP/mke2fs.log
    18211824    rm -f $MINDI_TMP/mke2fs.log
    1822     mount -t $t -o loop $imagefile $mountpoint || LogIt "Cannot mount (PBDI)\n\n"
     1825    mount -t $t -o loop $imagefile $mountpoint || LogIt "Cannot mount (PBDI)"
    18231826# copy Mindi's skeleton fs & lilo/syslinux/whatever stuff into it
    18241827    mkdir -p $mountpoint/etc
     
    18311834    cd $mountpoint
    18321835    if [ "$ARCH" != "ia64" ] ; then
    1833         tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz\n"
     1836        tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz"
    18341837    fi
    18351838    cd $old_pwd
    18361839    losetup /dev/loop0 > /dev/null 2> /dev/null
    1837     [ "$?" -eq "0" ] || losetup /dev/loop0 -d || Die "Please free up /dev/loop0 by typing   'losetup /dev/loop0 -d'.\nReboot if necessary.\n"
     1840    [ "$?" -eq "0" ] || losetup /dev/loop0 -d || Die "Please free up /dev/loop0 by typing   'losetup /dev/loop0 -d'.\nReboot if necessary."
    18381841    CopyBootBFile $mountpoint/boot.b
    18391842
     
    18431846    cp -f $MINDI_TMP/mindi.rdz $mountpoint 2>> $LOGFILE
    18441847    if [ "$?" -ne "0" ] ; then
    1845         LogIt "Failed to copy $MINDI_TMP/mindi.rdz to $mountpoint\n"
     1848        LogIt "Failed to copy $MINDI_TMP/mindi.rdz to $mountpoint"
    18461849        cat $MINDI_TMP/mtpt.$$ >> $LOGFILE
    1847         LogIt "Please unload some of your modules and try again.\n"
     1850        LogIt "Please unload some of your modules and try again."
    18481851        rm -f $MINDI_TMP/mtpt.$$
    1849         LogIt "Cannot incorporate mindi.rdz in bootdisk (kernel / modules too big?)\n"
     1852        LogIt "Cannot incorporate mindi.rdz in bootdisk (kernel / modules too big?)"
    18501853        retval=$(($retval+1))
    18511854    fi
     
    18741877        cd $old_pwd
    18751878        umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)"
    1876         rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)\n"
     1879        rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)"
    18771880    #   losetup /dev/loop0 -d
    18781881        res=0
    18791882        write_full_floppy_of_kernel $kernelpath $imagesdir/mindi-boot.1440.img 1440
    18801883        res=$(($res+$?))
    1881         cp -f $MINDI_TMP/mindi.rdz $imagesdir/mindi-root.1440.img
     1884        cp -f $MINDI_TMP/mindi.rdz $imagesdir/mindi-root.1440.img 2>> $LOGFILE
    18821885        res=$(($res+$?))
    18831886        rm -f $imagefile
    18841887        if [ "$res" -ne "0" ]; then
    1885             LogIt "Warning - failed to create 1.44MB boot/root floppies\n"
     1888            LogIt "WARNING - failed to create 1.44MB boot/root floppies"
    18861889            rm -f $imagesdir/mindi-*.1440.img
    18871890        fi
     
    18941897# make it bootable
    18951898    rm -f $mountpoint/zero
    1896     [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint
     1899    [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2>> $LOGFILE
    18971900    if [ "$disksize" -gt "2880" ] && [ ! "$KERN_DISK_MADE" ] ; then
    18981901        if [ "$ARCH" != "ia64" ] ; then
     
    19111914    if [ $? -ne "0" ] ; then
    19121915        if [ "`grep -F "/tmp/dev.0" $LOGFILE`" ] ; then
    1913             LogIt "The '/tmp/dev.0' error is NOT Mindi's fault. It is LILO's.\n"
    1914             LogIt "Please reboot your PC as a workaround.\n"
    1915             Die "LILO sneezed and Mindi caught a cold. Please read the README / FAQ.\n"
     1916            LogIt "The '/tmp/dev.0' error is NOT Mindi's fault. It is LILO's."
     1917            LogIt "Please reboot your PC as a workaround."
     1918            Die "LILO sneezed and Mindi caught a cold. Please read the README / FAQ."
    19161919        fi
    19171920        echo "$LILO_EXE -r $mountpoint ...failed."
    19181921        echo -en "Press ENTER to continue."; read line
    1919         LogIt "Cannot run lilo on $mountpoint\nPlease upgrade/downgrade your version of LILO. It has a bug.\n"
     1922        LogIt "Cannot run lilo on $mountpoint\nPlease upgrade/downgrade your version of LILO. It has a bug."
    19201923        retval=$(($retval+1))
    19211924    fi
    1922     cp -f $liloconf $MINDI_TMP/lilo.conf
     1925    cp -f $liloconf $MINDI_TMP/lilo.conf 2>> $LOGFILE
    19231926    if [ "$ARCH" = "ia64" ] ; then
    1924         cp `dirname $kernelpath`/*.efi $mountpoint
     1927        cp `dirname $kernelpath`/*.efi $mountpoint 2>> $LOGFILE
    19251928    fi
    19261929    umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)"
    19271930    echo -en "..."
    1928     rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)\n"
     1931    rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)"
    19291932    if [ "$retval" -eq "0" ] ; then
    19301933        echo -en "...$DONE\r"
     
    19371940        rm -f $imagefile
    19381941    fi
    1939     [ "$retval" -ne "0" ] && LogIt "PrepareBootDiskImage() is returning nonzero\n"
     1942    [ "$retval" -ne "0" ] && LogIt "PrepareBootDiskImage() is returning nonzero"
    19401943    return $retval
    19411944}
     
    19701973    else
    19711974        dd if=/dev/zero of=$imagefile bs=1k count=$disksize &> /dev/null || Die "Cannot dd blank file"
    1972         mkfs.vfat $imagefile
    1973         syslinux $imagefile
    1974     fi
    1975     mount -t vfat -o loop $imagefile $mountpoint || LogIt "Cannot mount (PBDI)\n\n"
     1975        mkfs.vfat $imagefile 2>> $LOGFILE
     1976        syslinux $imagefile 2>> $LOGFILE
     1977    fi
     1978    mount -t vfat -o loop $imagefile $mountpoint || LogIt "Cannot mount (PBDI)"
    19761979
    19771980    # copy Mindi's skeleton fs & lilo/syslinux/whatever stuff into it
     
    19891992    cp -f $MINDI_TMP/mindi.rdz $mountpoint/initrd.img 2>> $LOGFILE
    19901993    if [ "$?" -ne "0" ] ; then
    1991         LogIt "Failed to copy $MINDI_TMP/mindi.rdz to $mountpoint\n"
     1994        LogIt "Failed to copy $MINDI_TMP/mindi.rdz to $mountpoint"
    19921995        cat $MINDI_TMP/mtpt.$$ >> $LOGFILE
    1993         LogIt "Please unload some of your modules and try again.\n"
     1996        LogIt "Please unload some of your modules and try again."
    19941997        rm -f $MINDI_TMP/mtpt.$$
    1995         LogIt "Cannot incorporate mindi.rdz in bootdisk (kernel / modules too big?)\n"
     1998        LogIt "Cannot incorporate mindi.rdz in bootdisk (kernel / modules too big?)"
    19961999        retval=$(($retval+1))
    19972000    fi
     
    20142017        cd $old_pwd
    20152018        umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)"
    2016         rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)\n"
     2019        rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)"
    20172020
    20182021        res=0
    20192022        write_full_floppy_of_kernel $kernelpath $imagesdir/mindi-boot.1440.img 1440
    20202023        res=$(($res+$?))
    2021         cp -f $MINDI_TMP/mindi.rdz $imagesdir/mindi-root.1440.img
     2024        cp -f $MINDI_TMP/mindi.rdz $imagesdir/mindi-root.1440.img 2>> $LOGFILE
    20222025        res=$(($res+$?))
    20232026        rm -f $imagefile
    20242027        if [ "$res" -ne "0" ]; then
    2025             LogIt "Warning - failed to create 1.44MB boot/root floppies\n"
     2028            LogIt "WARNING - failed to create 1.44MB boot/root floppies"
    20262029            rm -f $imagesdir/mindi-*.1440.img
    20272030        fi
     
    20362039    rm -f $mountpoint/zero
    20372040    mkdir -p $mountpoint/etc
    2038     [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint
     2041    [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2>> $LOGFILE
    20392042    umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)"
    20402043    echo -en "..."
    2041     rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)\n"
     2044    rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)"
    20422045
    20432046    if [ "$retval" -eq "0" ] ; then
     
    20522055        rm -f $imagefile
    20532056    fi
    2054     [ "$retval" -ne "0" ] && LogIt "PrepareBootDiskImage() is returning nonzero\n"
     2057    [ "$retval" -ne "0" ] && LogIt "PrepareBootDiskImage() is returning nonzero"
    20552058    return $retval
    20562059}
     
    20762079        cd $MINDI_TMP
    20772080        for i in `ListKernelModulePaths | HackPathsToFailsafe` ; do
    2078             cp --parents -pRdf ./$i $bigdir || Die "PDDI can't cp $i->$bigdir"
     2081            cp --parents -pRdf ./$i $bigdir 2>> $LOGFILE || Die "PDDI can't cp $i->$bigdir"
    20792082            if [ "`du -sk $i | cut -f1`" -lt "$(($CHOPSIZE*2))" ] ; then
    2080                 cp --parents -pRdf $i $bigdir
     2083                cp --parents -pRdf $i $bigdir 2>> $LOGFILE
    20812084            else
    20822085                ChopUpAndCopyFile $i $bigdir $CHOPSIZE $BIGNO
     
    20862089        for i in $EXTRA_MODS ; do
    20872090            j=`find lib/modules/$FAILSAFE_KVER -name $i.*o 2> /dev/null`
    2088             [ ! "$j" ] && echo "Warning - cannot find failsafe module $i.o" >> $LOGFILE
     2091            [ ! "$j" ] && echo "WARNING - cannot find failsafe module $i.o" >> $LOGFILE
    20892092            for k in $j ; do
    20902093                if [ "`du -sk $k | cut -f1`" -lt "$CHOPSIZE" ] ; then
    2091                     cp --parents -pRdf $k $bigdir
     2094                    cp --parents -pRdf $k $bigdir 2>> $LOGFILE
    20922095                else
    20932096                    ChopUpAndCopyFile $k $bigdir $CHOPSIZE $BIGNO
     
    21182121    for i in `mount | cut -d' ' -f3` ; do
    21192122        for j in io.sys msdos.sys ; do
    2120             [ -e "$i/$j" ] && cp -f $i/$j $bigdir
     2123            [ -e "$i/$j" ] && cp -f $i/$j $bigdir 2>> $LOGFILE
    21212124        done
    21222125    done
     
    21252128    i=`cat $MINDI_TMP/BOOTLOADER.DEVICE 2> /dev/null`
    21262129    if [ "$i" ] ; then
    2127         LogIt "Backing up $i's MBR\n"
     2130        LogIt "Backing up $i's MBR"
    21282131        dd if=$i of=$bigdir/BOOTLOADER.MBR bs=446 count=1 >> $LOGFILE 2>> $LOGFILE
    21292132        sleep 1
     
    21312134        j=$i
    21322135        [ -h "$j" ] && j=`readlink -f $j`
    2133         LogIt "Creating /dev/boot_device ($j)\n"
     2136        LogIt "Creating /dev/boot_device ($j)"
    21342137        mkdir -p $bigdir/dev
    21352138        cp -pRdf $j $bigdir/dev/boot_device 2> /dev/null || Die "Unable to create /dev/boot_device on ramdisk"
     
    21402143
    21412144    [ -e "$MINDI_LIB/aux-tools" ] || Die "aux-tools not found in Mindi's home dir. Do you have multiple copies of Mindi lying around? Please delete them. No, don't e-mail me and ask how. ;) Use 'rm'."
    2142     cp -Rdf $MINDI_LIB/aux-tools/* . 2>> $LOGFILE || LogIt "Warning - error occurred while unzipping aux-tools\n"
     2145    cp -Rdf $MINDI_LIB/aux-tools/* . 2>> $LOGFILE || LogIt "WARNING - error occurred while unzipping aux-tools"
    21432146    if [ -e "$MINDI_LIB/x11-tools.tgz" ] ; then
    2144         tar -zxf $MINDI_LIB/x11-tools.tgz 2>> $LOGFILE || LogIt "Warning - error occurred while unzipping x11-tools.tgz\n"
     2147        tar -zxf $MINDI_LIB/x11-tools.tgz 2>> $LOGFILE || LogIt "WARNING - error occurred while unzipping x11-tools.tgz"
    21452148    fi
    21462149    if [ -e "$MONDO_SHARE/restore-scripts" ] ; then
     
    21482151        [ "$?" -ne "0" ] && [ "`DidMondoCallMe`" ] && Die "Cannot find/install $MONDO_SHARE/restore-scripts"
    21492152    fi
    2150     [ -d "/lib/dev-state" ] && cp --parents -pRdf /lib/dev-state .
     2153    [ -d "/lib/dev-state" ] && cp --parents -pRdf /lib/dev-state . 2>> $LOGFILE
    21512154    cd $old_pwd
    21522155    echo -e "$DONE"
     
    21632166    mkdir -p $minidir_root/$noof_disks/tmp
    21642167    cp -f $MINDI_TMP/mountlist.txt $minidir_root/$noof_disks/tmp/mountlist.txt 2> /dev/null || Die "Cannot copy mountlist.txt from $MINDI_TMP to data disk"
    2165     [ "`DidMondoCallMe`" ] && cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MINDI_TMP/.
     2168    [ "`DidMondoCallMe`" ] && cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MINDI_TMP/. 2>> $LOGFILE
    21662169    [ $LVM != "false" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm
    21672170    cat $minidir_root/$noof_disks/tmp/mountlist.txt >> $LOGFILE
     
    22422245        return 1
    22432246    fi
    2244     lines_total=`wc -l $orig_file | gawk '{print $1;}'`
     2247    lines_total=`wc -l $orig_file | $AWK '{print $1;}'`
    22452248    lines_remaining=$(($lines_total-$lino))
    22462249    head -n$(($lino-1)) $orig_file > $new_file
     
    23112314
    23122315    tempfile=$MINDI_TMP/$$.strip.txt
    2313     cp -f $1 $tempfile
     2316    cp -f $1 $tempfile 2>> $LOGFILE
    23142317    $AWK '{if (substr($0,0,1)!="#" || substr($0,0,3)=="#!/") {print $0;};}' $tempfile > $1
    23152318    rm -f $tempfile
     
    23432346    tmpfile=$MINDI_TMP/stripped.$$.dat
    23442347    [ -d "$1" ] || [ -h "$1" ] && return
    2345     cp -f $1 $tmpfile
     2348    cp -f $1 $tmpfile 2>> $LOGFILE
    23462349    strip $tmpfile 2> /dev/null
    23472350    if [ "$?" -eq "0" ] ; then
    2348         cp -f $tmpfile $1
     2351        cp -f $tmpfile $1 2>> $LOGFILE
    23492352        echo "Stripped binary $2" >> $LOGFILE
    23502353    fi
     
    24032406            # Used by ia64
    24042407            if [ "`gzip -cd $fname | strings 2> /dev/null | grep -F "$kdate"`" = "" ] ; then
    2405                 LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting? Naughty but I'll allow it...\n"
     2408                LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting? Naughty but I'll allow it..."
    24062409                duff_kernels="$fname $duff_kernels"
    24072410            else
     
    24112414        else
    24122415            if [ "`strings $fname 2> /dev/null | grep -F "$kdate"`" = "" ] ; then
    2413                 LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting?\n Naughty but I'll allow it...\n"
     2416                LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting?\n Naughty but I'll allow it..."
    24142417                duff_kernels="$fname $duff_kernels"
    24152418            else
     
    24232426    fi
    24242427    if [ ! "$possible_kernels" ] ; then
    2425         LogIt "No kernel matches exactly. Are there any duff kernels?\n"
     2428        LogIt "No kernel matches exactly. Are there any duff kernels?"
    24262429        possible_kernels="$duff_kernels"
    24272430        if [ ! "$possible_kernels" ] ; then
    2428             LogIt "Sorry, no duff kernels either\n"
     2431            LogIt "Sorry, no duff kernels either"
    24292432        else
    2430             LogIt "I bet you're running Debian or Gentoo, aren't you?\n"
    2431             LogIt "Your kernel doesn't have a sane builddate. Oh well...\n"
     2433            LogIt "I bet you're running Debian or Gentoo, aren't you?"
     2434            LogIt "Your kernel doesn't have a sane builddate. Oh well..."
    24322435        fi
    24332436    fi
     
    24352438    noof_kernels=`CountItemsIn "$possible_kernels"`
    24362439    if [ "$noof_kernels" -eq "0" ] ; then
    2437         LogIt "Could not find your kernel.\n"
     2440        LogIt "Could not find your kernel."
    24382441        if [ -e "/boot/vmlinuz" ] ; then
    2439             LogIt "Using /boot/vmlinuz as a last resort.\n"
     2442            LogIt "Using /boot/vmlinuz as a last resort."
    24402443            output=/boot/vmlinuz
    24412444        else
     
    24502453            if echo $i | grep "`uname -r`" ; then
    24512454                LogIt "OK, I used my initiative and found that "
    2452                 LogIt "$i is probably your kernel.\n "
     2455                LogIt "$i is probably your kernel. "
    24532456                output="$i"
    24542457                return
     
    24592462            echo "Schlomo, this one's for you." >> $LOGFILE
    24602463        else
    2461             LogIt "Two or more possible kernels found. You may specify any one of them and the \n"
    2462             LogIt "boot disks will still work, probably. If one does not work, try another.\n"
    2463             LogIt "$possible_kernels\n"
     2464            LogIt "Two or more possible kernels found. You may specify any one of them and the "
     2465            LogIt "boot disks will still work, probably. If one does not work, try another."
     2466            LogIt "$possible_kernels"
    24642467            echo ""
    24652468        fi
     
    24912494    if [ -e "dev" ] ; then
    24922495        echo "Copying dev/* to $minidir_root/$noof_disks" >> $LOGFILE
    2493         cp --parents -pRdf dev $minidir_root/$noof_disks
     2496        cp --parents -pRdf dev $minidir_root/$noof_disks 2>> $LOGFILE
    24942497    fi
    24952498    TemporarilyCompressAllFiles "$list_of_files" $minidir_root
     
    25022505        fi
    25032506        if [ "$i" -eq "0" ] ; then
    2504             LogIt "Cannot add file $filename to minidir $minidir_root\n"
     2507            LogIt "Cannot add file $filename to minidir $minidir_root"
    25052508            retval=$(($retval+1))
    25062509        fi
     
    25552558        s=`which $w 2> /dev/null`
    25562559        if [ -e "$s" ] ; then
    2557             cp --parents -af $s .
     2560            cp --parents -af $s . 2>> $LOGFILE
    25582561        fi
    25592562    done
     
    26082611        list_of_groovy_mods="$list_of_groovy_mods $NET_MODS"
    26092612    fi
    2610     [ -e "$floppy_modules_path" ] || LogIt "path $floppy_modules_path does not exist.\n If you're not using a modular kernel then you're NUTS.\n"
     2613    [ -e "$floppy_modules_path" ] || LogIt "path $floppy_modules_path does not exist.\n If you're not using a modular kernel then you're NUTS."
    26112614    for i in $list_of_groovy_mods ; do
    26122615        floppy_modules="$floppy_modules `FindSpecificModuleInPath $floppy_modules_path $i`"
     
    26162619        [ "$YOUR_KERNEL_SUCKS" ] && i=$MINDI_TMP/$i
    26172620        echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE
    2618         cp -df $i $mountpoint/ 2>/dev/null || LogIt "Unable to copy $i to $mountpoint\n"
     2621        cp -df $i $mountpoint/ 2>/dev/null || LogIt "Unable to copy $i to $mountpoint"
    26192622        [ "`echo "$i" | grep -F ".gz"`" ] && gunzip -f $mountpoint/`basename $i`
    26202623    done
     
    26782681    diskno=1
    26792682    while [ "$diskno" -le "$noof_disks" ] ; do
    2680         cd $minidir_root/$diskno || LogIt "Warning - cannot cd to $minidir_root/$diskno\n"
     2683        cd $minidir_root/$diskno || LogIt "WARNING - cannot cd to $minidir_root/$diskno"
    26812684        tar -cf - . 2>> $LOGFILE | gzip -9 > $tardir/$diskno.tar.gz || Die "Can't tar/gzip disk#$diskno; please tell Dev Team -exactly- what the errors where."
    26822685        diskno=$(($diskno+1))
    26832686        echo -n "..."
    2684         cp -pRdf * $minidir_root/all
     2687        cp -pRdf * $minidir_root/all 2>> $LOGFILE
    26852688    done
    26862689    mkdir -p $minidir_root/all/tmp
     
    26902693        for q in filelist.full.gz biggielist.txt ; do
    26912694            [ ! -e "$MINDI_TMP/$q" ] && Die "Cannot find $MINDI_TMP/$q"
    2692             cp -pRdf $MINDI_TMP/$q tmp/
     2695            cp -pRdf $MINDI_TMP/$q tmp/ 2>> $LOGFILE
    26932696        done
    26942697        mkdir -p $minidir_root/all/tmp
     
    27182721
    27192722if [ -e "/etc/conf.modules" ] && [ ! -e "/etc/modules.conf" ] ; then
    2720     LogIt "Warning - Ancient distro detected.\n" 1
     2723    LogIt "WARNING - Ancient distro detected." 1
    27212724    ln -sf /etc/conf.modules /etc/modules.conf
    27222725fi
     
    28242827###
    28252828        kernelname=`echo $kernelpath | cut -d'-' -f2-`
    2826         LogIt "kernelname = $kernelname\n"
    2827         LogIt "kernelpath = $kernelpath\n"
     2829        LogIt "kernelname = $kernelname"
     2830        LogIt "kernelpath = $kernelpath"
    28282831        if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ]
    28292832        then
    2830            LogIt "Module path for ${kernelpath} not found...\n"
    2831            LogIt "using running kernel\'s modules.\n"
     2833           LogIt "Module path for ${kernelpath} not found..."
     2834           LogIt "using running kernel\'s modules."
    28322835           kernelname=`uname -r`
    28332836        else
    2834            LogIt "Using modules for kernel: ${kernelname}\n"
     2837           LogIt "Using modules for kernel: ${kernelname}"
    28352838        fi
    28362839###
     
    28622865        [ "$USE_COMP" = "" ] && USE_COMP=yes
    28632866        [ "$NOT_BOOT" = "" ] && NOT_BOOT=no
    2864         [ "$TAPEDEV" ] && LogIt "This is a tape-based backup. Fine.\n"
     2867        [ "$TAPEDEV" ] && LogIt "This is a tape-based backup. Fine."
    28652868        [ "$kernelpath" = "" ] && kernelpath=`TryToFindKernelPath`
    28662869        kernelname=`echo $kernelpath | cut -d'-' -f2-`
    28672870        if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ]
    28682871        then
    2869            LogIt "Module path for ${kernelpath} not found...\n"
    2870            LogIt "using running kernel\'s modules.\n"
     2872           LogIt "Module path for ${kernelpath} not found..."
     2873           LogIt "using running kernel\'s modules."
    28712874           kernelname=`uname -r`
    28722875        else
    2873            LogIt "Using modules for kernel: ${kernelname}\n"
     2876           LogIt "Using modules for kernel: ${kernelname}"
    28742877        fi
    28752878        [ "$CDRECOVERY" = "yes" ] && [ "$TAPEDEV" != "" ] && Die "Sorry, you can't use --cd-recovery and --write-tapes at the same time"
     
    28972900[ -e "$iso_cfg_file" ] || Die "Cannot find $iso_cfg_file"
    28982901if [ ! "`DidMondoCallMe`" ] ; then
    2899     LogIt "Mindi Linux mini-distro generator v$MINDI_VERSION\n"
    2900     LogIt "Latest Mindi is available from http://www.mondorescue.org\n"
    2901     LogIt "BusyBox sources are available from http://www.busybox.net\n"
     2902    LogIt "Mindi Linux mini-distro generator v$MINDI_VERSION"
     2903    LogIt "Latest Mindi is available from http://www.mondorescue.org"
     2904    LogIt "BusyBox sources are available from http://www.busybox.net"
    29022905    LogIt "------------------------------------------------------------------------------"
    29032906else
     
    29172920echo "NOT_BOOT = '$NOT_BOOT'" >> $LOGFILE
    29182921if [ "$NOT_BOOT" != "" ] && [ "$NOT_BOOT" != "0" ] && [ "$NOT_BOOT" != "no" ] ; then
    2919     LogIt "Just creating mondo-restore.cfg and a small all.tar.gz for Mondo. Nothing else.\n"
     2922    LogIt "Just creating mondo-restore.cfg and a small all.tar.gz for Mondo. Nothing else."
    29202923    MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg
    29212924    MakeMountlist $MINDI_TMP/mountlist.txt
     
    29252928    tar -cv tmp | gzip -9 > $MINDI_TMP/all.tar.gz || Die "Cannot make small all.tar.gz"
    29262929    sleep 2
    2927     LogIt "Done. Exiting.\n"
     2930    LogIt "Done. Exiting."
    29282931    MindiExit 0
    29292932fi
     
    29602963if [ "$YOUR_KERNEL_SUCKS" != "" ] || [ "$kernelpath" = "" ] || [ "$kernelpath" = "SUCKS" ] || [ "$kernelpath" = "FAILSAFE" ] ; then
    29612964    kernelpath=$MINDI_LIB/vmlinuz
    2962     LogIt "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks.\n"
    2963     LogIt "However, you are still running your kernel. If Mindi fails to create your\n"
    2964     LogIt "disks then it may still be a result of a problem with your kernel.\n"
     2965    LogIt "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks."
     2966    LogIt "However, you are still running your kernel. If Mindi fails to create your"
     2967    LogIt "disks then it may still be a result of a problem with your kernel."
    29652968    pwd=`pwd`
    29662969    cd $MINDI_TMP
     
    29702973fi
    29712974echo -e "Mindi's temp dir = $MINDI_TMP \nMindi's output dir=$CACHE_LOC" >> $LOGFILE
    2972 [ "$(($RANDOM%64))" -eq "0" ] && LogIt "Dude, I've looked inside your computer and it's really dusty...\n"
     2975[ "$(($RANDOM%64))" -eq "0" ] && LogIt "Dude, I've looked inside your computer and it's really dusty..."
    29732976
    29742977[ "$YOUR_KERNEL_SUCKS" ] && [ ! "$FAILSAFE_KVER" ] && Die "Please install mindi-kernel package. You need it. Go to http://www.mondorescue.org and download it, then install it."
     
    29882991    else
    29892992        if ! PrepareBootDiskImage_LILO $CACHE_LOC 1722 $kernelpath $ramdisk_size ; then
    2990             LogIt "Warning - failed to create 1.72MB boot image. Please reduce your kernel's size\n"
    2991             LogIt "if you want to make a 1.72MB floppy disk.\n"
     2993            LogIt "WARNING - failed to create 1.72MB boot image. Please reduce your kernel's size"
     2994            LogIt "if you want to make a 1.72MB floppy disk."
    29922995        fi
    29932996        if ! PrepareBootDiskImage_LILO $CACHE_LOC 2880 $kernelpath $ramdisk_size ;  then
    2994             LogIt "Warning - failed to create 2.88MB floppy disk image.\n"
    2995             LogIt "Please reduce your kernel's size\n"
    2996             LogIt "if you want to make a 2.88MB floppy disk.\n"
     2997            LogIt "WARNING - failed to create 2.88MB floppy disk image."
     2998            LogIt "Please reduce your kernel's size"
     2999            LogIt "if you want to make a 2.88MB floppy disk."
    29973000            PrepareBootDiskImage_LILO $CACHE_LOC 5760 $kernelpath $ramdisk_size || Die "Failed to create 2.88MB floppy disk image."
    29983001        fi
     
    30003003else
    30013004    if ! PrepareBootDiskImage_SYSLINUX $CACHE_LOC 1722 $kernelpath $ramdisk_size ; then
    3002         LogIt "Warning - failed to create 1.72MB boot image. Please reduce your kernel's size\n"
    3003         LogIt "if you want to make a 1.72MB floppy disk.\n"
     3005        LogIt "WARNING - failed to create 1.72MB boot image. Please reduce your kernel's size"
     3006        LogIt "if you want to make a 1.72MB floppy disk."
    30043007        if ! PrepareBootDiskImage_SYSLINUX $CACHE_LOC 2880 $kernelpath $ramdisk_size ; then
    3005             LogIt "Warning - failed to create 2.88MB floppy disk image.\n"
    3006             LogIt "Please reduce your kernel's size\n"
    3007             LogIt "if you want to make a 2.88MB floppy disk.\n"
     3008            LogIt "WARNING - failed to create 2.88MB floppy disk image."
     3009            LogIt "Please reduce your kernel's size"
     3010            LogIt "if you want to make a 2.88MB floppy disk."
    30083011            PrepareBootDiskImage_SYSLINUX $CACHE_LOC 5760 $kernelpath $ramdisk_size || Die "Failed to create 5.76MB floppy disk image."
    30093012        fi
     
    30243027    fi
    30253028    OfferToMakeBootableISO $CACHE_LOC
    3026     LogIt "Finished.\n"
     3029    LogIt "Finished."
    30273030elif [ "$TAPEDEV" ] ; then
    30283031    mkdir -p /root/images/mindi
     
    30303033    OfferToMakeBootableISO $CACHE_LOC
    30313034    if [ -e "$CACHE_LOC/all.tar.gz" ] ; then
    3032         cp -f $CACHE_LOC/all.tar.gz $MINDI_TMP/
     3035        cp -f $CACHE_LOC/all.tar.gz $MINDI_TMP/ 2>> $LOGFILE
    30333036    else
    30343037        Die "Cannot find all.tar.gz, to be written to tape"
     
    30383041fi
    30393042# cleanup
    3040 LogIt "$FRIENDLY_OUTSTRING\n"
     3043LogIt "$FRIENDLY_OUTSTRING"
    30413044for mtpt in $FLOPPY_WAS_MOUNTED ; do
    30423045    mount $mtpt
Note: See TracChangeset for help on using the changeset viewer.