Changeset 2341


Ignore:
Timestamp:
Aug 21, 2009, 2:50:32 AM (10 years ago)
Author:
bruno
Message:
  • Option -Y documented for mondoarchive
  • New Log* functions in mindi
  • Fix bug in the function dealing with % analysis
  • Still trying to improve screen display globally
Location:
branches/2.2.10
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/mindi

    r2338 r2341  
    137137    [ "$KBDEPTH" -gt "128" ] && Die "Edit $MINDI_SBIN/mindi and disable FindAndAddUserKeyboardMappingFile (line 2160, approx.)"
    138138    if [ -e "$bigdir/$mappath" ] ; then
    139         echo "$mappath already added" >> $LOGFILE
     139        LogFile "$mappath already added"
    140140        return
    141141    elif [ -d "$bigdir/$mappath" ] ; then
     
    143143        return
    144144    fi
    145     echo "Added kbd map $mappath" >> $LOGFILE
     145    LogFile "Added kbd map $mappath"
    146146    if [ ! -e "$mappath" ] ; then
    147147            mappath=`grep "i[3-8]86" $MINDI_TMP/keymaps.find | grep "$locale[^r][^/]" | grep -vx " *#.*"`
    148148        if [ ! -e "$mappath" ] ; then
    149             LogIt "Cannot add $mappath: kbd map file not found"
     149            LogAll "Cannot add $mappath: kbd map file not found"
    150150            return
    151151        fi
     
    155155
    156156    mkdir -p $bigdir/etc
    157     tar cf - -C / $mappath 2>> $MINDI_TMP/$$.log | (cd $bigdir ; tar xf -) || LogIt "AKMF -- Could not copy $mappath to $bigdir" $MINDI_TMP/$$.log
     157    tar cf - -C / $mappath 2>> $MINDI_TMP/$$.log | (cd $bigdir ; tar xf -) || LogAll "AKMF -- Could not copy $mappath to $bigdir" $MINDI_TMP/$$.log
    158158    if [ "`echo $mappath | grep -F ".gz"`" ] ; then
    159159        included_list=`gzip -dc $mappath | grep -Fi include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`
     
    184184        # Non absolute file names should not arrive till here => skipped
    185185        if [ `echo "$incoming" | cut -c1` != '/' ]; then
    186             LogIt "Unable to handle $incoming"
     186            LogAll "Unable to handle $incoming"
    187187            incoming=`ReadLine`
    188188            continue
     
    202202            # Only uncompress modules if not using udevd
    203203            if [ "`echo "$incoming" | grep "lib/modules/.*\..*o\.gz"`" != "" ] && [ "`ps auxww | grep -v grep | grep -qw udevd`" != "" ]; then
    204                 gunzip -f $outdir/$incoming || LogIt "Cannot gunzip $outdir/$incoming"
     204                gunzip -f $outdir/$incoming || LogAll "Cannot gunzip $outdir/$incoming"
    205205            fi
    206206            [ -x "$outdir" ] && StripExecutable $outdir "-$filename-"
     
    231231    local my_partitions
    232232
    233     echo "Mindi $MINDI_VERSION is exiting" >> $LOGFILE
    234     echo "End date : `date`" >> $LOGFILE
     233    LogFile "Mindi $MINDI_VERSION is exiting"
     234    LogFile "End date : `date`"
    235235    if [ _"$MONDO_SHARE" != _"" ] ; then
    236236        echo "------------- mindi logfile included -------------------------" >> /var/log/mondoarchive.log
     
    255255    local i
    256256    if [ "$1" = "" ] ; then
    257         LogIt "FATAL ERROR"
    258     else
    259         LogIt "FATAL ERROR. $1"
     257        LogAll "FATAL ERROR"
     258    else
     259        LogAll "FATAL ERROR. $1"
    260260    fi
    261261    if [ _"$2" != _"" ]; then
     
    264264    rm -f "$2"
    265265
    266     LogIt "Please e-mail a copy of $LOGFILE to the mailing list."
    267     LogIt "See http://www.mondorescue.org for more information."
    268     LogIt "WE CANNOT HELP unless you enclose that file.\n"
     266    LogAll "Please e-mail a copy of $LOGFILE to the mailing list."
     267    LogAll "See http://www.mondorescue.org for more information."
     268    LogAll "WE CANNOT HELP unless you enclose that file.\n"
    269269    MindiExit -1
    270270}
     
    286286        vanilla_lib_name=`echo "$optimized_lib_name" | sed -e 's/i[5-7]86//' -e 's/cmov//' -e 's/nosegneg//' | tr -s '/' '/'`
    287287        echo "$vanilla_lib_name" >> $filelist
    288         echo "Adding $vanilla_lib_name to filelist" >> $LOGFILE
     288        LogFile "Adding $vanilla_lib_name to filelist"
    289289        mkdir -p $outdir$optimized_lib_name > /dev/null 2> /dev/null
    290290        rmdir $outdir$optimized_lib_name > /dev/null 2> /dev/null
     
    292292        # This may return multiple files
    293293        for resolved in `ReadAllLink $vanilla_lib_name`; do
    294             echo "Adding as deps $resolved to filelist" >> $LOGFILE
     294            LogFile "Adding as deps $resolved to filelist"
    295295            vanilla_resolved_name=`echo "$resolved" | sed -e 's/i[5-7]86//' -e 's/cmov//' -e 's/nosegneg//' | tr -s '/' '/'`
    296296            mkdir -p $outdir$resolved> /dev/null 2> /dev/null
    297297            rmdir $outdir$resolved > /dev/null 2> /dev/null
    298298            ln -sf $vanilla_resolved_name $outdir$resolved
    299             echo "Excluding deps $resolved" >> $LOGFILE
     299            LogFile "Excluding deps $resolved"
    300300            grep -Fvx "$resolved" "$filelist" > $filelist.tmp
    301             echo "Replacing it with $vanilla_resolved_name" >> $LOGFILE
     301            LogFile "Replacing it with $vanilla_resolved_name"
    302302            echo "$vanilla_resolved_name" >> $filelist.tmp
    303303            mv -f $filelist.tmp $filelist
     
    312312FindAndAddUserKeyboardMappingFile() {
    313313    local r res mapfile mappath included_item included_list keyfile mp locale
    314     LogIt "Analyzing your keyboard's configuration."
     314    LogAll "Analyzing your keyboard's configuration."
    315315    KEYDIR=/lib/kbd
    316316    [ ! -e "$KEYDIR" ] && KEYDIR=/usr/share/kbd     # Slackware
     
    320320    [ ! -e "$KEYDIR" ] && KEYDIR=/etc/condole-setup
    321321    if [ ! -e "$KEYDIR" ] ; then
    322         LogIt "Keyboard mapping directory not found. I shall use default map at boot-time."
     322        LogAll "Keyboard mapping directory not found. I shall use default map at boot-time."
    323323        return 0
    324324    fi
    325325    if [ -e "/etc/sysconfig/keyboard" ] ; then
    326         echo "Red Hat-style config detected." >> $LOGFILE
     326        LogFile "Red Hat-style config detected."
    327327        keyfile=/etc/sysconfig/keyboard
    328328    elif [ -e "/etc/rc.d/rc.keymap" ] ; then
    329         echo "Slackware-style config detected." >> $LOGFILE
     329        LogFile "Slackware-style config detected."
    330330        keyfile=/etc/rc.d/rc.keymap
    331331    elif [ -e "/etc/rc.config" ] ; then
    332         echo "Debian-style config detected." >> $LOGFILE
     332        LogFile "Debian-style config detected."
    333333        keyfile=/etc/rc.config
    334334    elif [ -e "/etc/console/boottime.kmap.gz" ] ; then
    335         echo "Debian-style config detected." >> $LOGFILE
     335        LogFile "Debian-style config detected."
    336336        echo -en "Adding the following keyboard mapping tables: "
    337337        mkdir -p $bigdir/tmp
     
    343343        return 0
    344344    elif [ -e "/etc/console-setup/boottime.kmap.gz" ] ; then
    345         echo "Ubuntu-style config detected." >> $LOGFILE
     345        LogFile "Ubuntu-style config detected."
    346346        echo -en "Adding the following keyboard mapping tables: "
    347347        mkdir -p $bigdir/tmp
     
    353353        return 0
    354354    elif [ -e "/etc/conf.d/keymaps" ] ; then
    355         echo "Gentoo-style config detected." >> $LOGFILE
     355        LogFile "Gentoo-style config detected."
    356356        keyfile=/etc/conf.d/keymaps
    357357    else
     
    359359        keyfile=`find /etc -name rc.config | head -n1`
    360360        if [ "$keyfile" = "" ] || [ ! -e "$keyfile" ] ; then
    361             LogIt "Unknown config detected. Default keyboard map will be used."
     361            LogAll "Unknown config detected. Default keyboard map will be used."
    362362            return
    363363        else
    364             echo "Found $keyfile" >> $LOGFILE
     364            LogFile "Found $keyfile"
    365365        fi
    366366    fi
    367367    if [ ! -e "$KEYDIR/keymaps" ] ; then
    368         LogIt "Keyboard mapping directory not found. Default keyboard map will be used."
     368        LogAll "Keyboard mapping directory not found. Default keyboard map will be used."
    369369        return
    370370    fi
    371     echo "keyfile=$keyfile" >> $LOGFILE
     371    LogFile "keyfile=$keyfile"
    372372    locale=`grep -F KEYTABLE "$keyfile" | tr -d '"' |cut -d'=' -f2`
    373373    [ ! "$locale" ] && locale=`grep '.map$' "$keyfile" | sed 's/^.* //'`        # Slackware
    374374    [ ! "$locale" ] && locale=`grep -E '^KEYMAP=' "$keyfile" | tr -d '"' |cut -d'=' -f2`        # Gentoo
    375     echo "locale=$locale" >> $LOGFILE
     375    LogFile "locale=$locale"
    376376    #
    377377    # Process the keymaps dir once for all
     
    384384    echo "$mp" | grep -q " "
    385385    if [ $? -eq 0 ]; then
    386         echo "WARNING: Multiple keymaps found: $mp" | tee -a $LOGFILE
    387         echo "The following one will be used" >> $LOGFILE
     386        LogAll "WARNING: Multiple keymaps found: $mp"
     387        LogFile "The following one will be used"
    388388    fi
    389389    for i in $mp ; do
     
    394394            mappath=$(find / -name "*/kbd/keymaps/*/$locale")
    395395    fi
    396     echo "mappath = $mappath" >> $LOGFILE
     396    LogFile "mappath = $mappath"
    397397    if [ ! -e "$mappath" ] || [ -d "$mappath" ] ; then
    398         LogIt "Keyboard mapping file not found. Default keyboard map will be used."
     398        LogAll "Keyboard mapping file not found. Default keyboard map will be used."
    399399        return
    400400    fi
     
    419419    [ ! -e "$ISOLINUX" ] && ISOLINUX=`find / -name isolinux.bin | grep -x "/.*/isolinux.bin"`
    420420    [ ! -e "$ISOLINUX" ] && Die "Please install isolinux first. If your syslinux RPM doesn't include isolinux, you may download an isolinux RPM from Mondo's website - go to http://www.mondorescue.com and click on 'Download'"
    421     echo "Found isolinux.bin at $ISOLINUX" >> $LOGFILE
     421    LogFile "Found isolinux.bin at $ISOLINUX"
    422422}
    423423
     
    432432    fi
    433433    if [ ! -e "$1" ] ; then
    434         LogIt "WARNING - cannot search specific path '$1'"
     434        LogAll "WARNING - cannot search specific path '$1'"
    435435        return 1
    436436    fi
     
    467467        filelist=`GenerateListForFile "$incoming"`
    468468        r=$?
    469         [ "$r" -ne "0" ] && LogIt "$incoming not found"
     469        [ "$r" -ne "0" ] && LogAll "$incoming not found"
    470470        res=$(($res+$r))
    471471#       echo "'$incoming' generates filelist '$filelist'" >> $LOGFILE
     
    474474        done
    475475        progress=$(($progress+1))
    476         echo -en "\r\t\t\t\t\t\t\t\t"
    477         i=$(($progress*100))
    478         i=$(($i/$noof_lines))
    479         echo -en "$i"
    480         echo -en "%"
    481         modres=$(($progress%4))
    482         [ "$modres" -eq "0" ] && echo -en "\t/"
    483         [ "$modres" -eq "1" ] && echo -en "\t-"
    484         [ "$modres" -eq "2" ] && echo -en "\t\\"
    485         [ "$modres" -eq "3" ] && echo -en "\t|"
     476        LogProgress $progress $noof_lines
    486477        incoming=`ReadLine`
    487478    done
     
    534525            done
    535526            progress=$(($progress+1))
    536             echo -en "\r\t\t\t\t\t\t\t\t"
    537             i=$(($progress*100))
    538             i=$(($i/$noof_lines))
    539             echo -en "$i"
    540             echo -en "%"
    541             modres=$(($progress%4))
    542             [ "$modres" -eq "0" ] && echo -en "\t/"
    543             [ "$modres" -eq "1" ] && echo -en "\t-"
    544             [ "$modres" -eq "2" ] && echo -en "\t\\"
    545             [ "$modres" -eq "3" ] && echo -en "\t|"
     527            LogProgress $progress $noof_lines
    546528            incoming=`ReadLine`
    547529        done
     
    554536    progress=0
    555537    noof_lines=`cat $tempfile | wc -l`
    556     echo "---------------------------------" >> $LOGFILE
    557     echo "List of dependencies:             " >> $LOGFILE
    558     echo "---------------------------------" >> $LOGFILE
     538    LogFile "---------------------------------"
     539    LogFile "List of dependencies:             "
     540    LogFile "---------------------------------"
    559541    for fname in `cat $tempfile` ; do
    560542        echo "$fname" | tee -a $LOGFILE >> $outfile.pre
    561543        LocateDeps $fname | tee -a $LOGFILE >> $outfile.pre
    562544        progress=$(($progress+1))
    563         echo -en "\r\t\t\t\t\t\t\t\t"
    564         i=$(($progress*100))
    565         i=$(($i/$noof_lines))
    566         echo -en "$i"
    567         echo -en "%"
    568         modres=$(($progress%4))
    569         [ "$modres" -eq "0" ] && echo -en "\t/"
    570         [ "$modres" -eq "1" ] && echo -en "\t-"
    571         [ "$modres" -eq "2" ] && echo -en "\t\\"
    572         [ "$modres" -eq "3" ] && echo -en "\t|"
     545        LogProgress $progress $noof_lines
    573546    done
    574547    if [ _"$MONDO_SHARE" != _"" ]; then
     
    577550        mkdir -p $bigdir/bin
    578551        if [ -e "$MINDI_TMP/post-nuke.tgz" ] ; then
    579             LogIt "\nIncorporating post-nuke tarball"
     552            LogAll "\nIncorporating post-nuke tarball"
    580553            old_pwd=`pwd`
    581554            cd $bigdir
    582             tar -zxf $MINDI_TMP/post-nuke.tgz 2>> $MINDI_TMP/$$.log || LogIt "Error occurred when untarring post-nuke tarball" $MINDI_TMP/$$.log
     555            tar -zxf $MINDI_TMP/post-nuke.tgz 2>> $MINDI_TMP/$$.log || LogAll "Error occurred when untarring post-nuke tarball" $MINDI_TMP/$$.log
    583556            cd $old_pwd
    584557        fi
     
    586559            LocateDeps $bigdir/usr/bin/mondo*restore >> $outfile.pre
    587560        else
    588             LogIt "Cannot find mondo*restore in mondo's tempdir, $MINDI_TMP"
    589             LogIt "I bet you've got a spare copy of Mondo or Mindi floating around on your system."
    590             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."
     561            LogAll "Cannot find mondo*restore in mondo's tempdir, $MINDI_TMP"
     562            LogAll "I bet you've got a spare copy of Mondo or Mindi floating around on your system."
     563            LogAll "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."
    591564            Die "Odd."
    592565        fi
    593         cp -f $MINDI_TMP/BOOTLOADER.* $bigdir 2>> $LOGFILE || LogIt "\nMondo v1.2x defaults to LILO as the bootloader, BTW."
     566        cp -f $MINDI_TMP/BOOTLOADER.* $bigdir 2>> $LOGFILE || LogAll "\nMondo v1.2x defaults to LILO as the bootloader, BTW."
    594567        if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    595             LogIt "\nIncorporating NFS-related settings"
     568            LogAll "\nIncorporating NFS-related settings"
    596569            for r in NFS-* ISO-PREFIX ; do
    597570                cp -f $MINDI_TMP/$r $bigdir/tmp 2>> $LOGFILE || Die "Cannot copy $r - did you run out of disk space?"
    598                 echo "Copying $r to ramdisk" >> $LOGFILE
     571                LogFile "Copying $r to ramdisk"
    599572            done
    600573        fi
     
    669642
    670643    # say where we are.
    671     echo "  GetInitrdFilesystemToUse(): called with parameter: $lvKernelImage.\n" >> $LOGFILE
     644    LogFile "  GetInitrdFilesystemToUse(): called with parameter: $lvKernelImage.\n"
    672645
    673646    # verify that file exists
     
    683656        [ $lvOffset -eq 0 ] && Die "gzip magic not found in file $lvKernelImage. Terminating."
    684657        lvOffset=`expr $lvOffset / 2`
    685         echo "  GetInitrdFilesystemToUse(): gzip magic found at lvOffset $lvOffset.\n" >> $LOGFILE
     658        LogFile "  GetInitrdFilesystemToUse(): gzip magic found at lvOffset $lvOffset.\n"
    686659
    687660        # scan kernel image for initrd filessystem support
     
    701674
    702675    # say what we are using
    703     echo "  GetInitrdFilesystemToUse(): Filesytem to use for initrd is $lvUseFilesystem.\n" >> $LOGFILE
     676    LogFile "  GetInitrdFilesystemToUse(): Filesytem to use for initrd is $lvUseFilesystem.\n"
    704677
    705678    # return file system to use
     
    787760    for module in $module_list $EXTRA_MODS ; do
    788761        r=`find /lib/modules/$kern -type f | grep "/${module}\..*o" | tail -n1`
    789         echo "module $module --> $r" >> $LOGFILE
     762        LogFile "module $module --> $r"
    790763        [ "$r" ] && echo "$r"
    791764        [ -f "$oss" ] && find $oss | grep -F $module
     
    804777    for fname in $incoming ; do
    805778        if [ ! -e "$fname" ] ; then
    806             echo "WARNING - $fname does not exist; cannot be LDD'd." >> $LOGFILE
     779            LogFile "WARNING - $fname does not exist; cannot be LDD'd."
    807780            if echo $fname | grep lvm &> /dev/null ; then
    808                 echo "This warning only affects you if you are using LVM." >> $LOGFILE
     781                LogFile "This warning only affects you if you are using LVM."
    809782                if echo "$MODULES" | grep lvm &> /dev/null ; then
    810                     echo "I think you are, so please take heed!" >> $LOGFILE
     783                    LogFile "I think you are, so please take heed!"
    811784                else
    812                     echo "I don't think you are, so don't worry about it." >> $LOGFILE
     785                    LogFile "I don't think you are, so don't worry about it."
    813786                fi
    814787            fi
    815788        elif [ -h "$fname" ] && [ -x "$fname" ] ; then
    816             echo "$fname is softlink" >> $LOGFILE
     789            LogFile "$fname is softlink"
    817790        else
    818791            ldd $fname 2> /dev/null | ProcessLDD
     
    884857}
    885858
    886 
    887 LogIt() {
     859LogProgress() {
     860    local i progress modres noof_lines
     861 
     862    progress=$1
     863    noof_lines=$2
     864
     865    echo -en "\r\t\t\t\t\t\t\t\t"
     866    i=$(($progress*100))
     867    i=$(($i/$noof_lines))
     868    echo -en "$i"
     869    echo -en "%"
     870    modres=$(($progress%4))
     871    [ "$modres" -eq "0" ] && echo -en "\t/"
     872    [ "$modres" -eq "1" ] && echo -en "\t-"
     873    [ "$modres" -eq "2" ] && echo -en "\t\\"
     874    [ "$modres" -eq "3" ] && echo -en "\t|"
     875}
     876
     877# Function to log on screen only
     878LogScreen() {
    888879    if [ -e /dev/stderr ] ; then
    889880        echo -e "$1" >> /dev/stderr
     
    891882        /usr/bin/logger -s $1
    892883    fi
     884}
     885
     886# Function to log in log file only
     887LogFile() {
     888
    893889    echo -e "$1" >> $LOGFILE
    894890    if [ _"$2" != _"" ]; then
     
    896892    fi
    897893    rm -f "$2"
     894}
     895
     896# Function to log in both screen and logfile
     897LogAll() {
     898    LogScreen "$1"
     899    LogFile "$1" "$2"
    898900}
    899901
     
    951953absolute_partition old_partition_fmt current_lvolume uname skip
    952954
    953     echo "Your raw fstab file looks like this:" >> $LOGFILE
    954     echo "------------------------------------" >> $LOGFILE
     955    LogFile "Your raw fstab file looks like this:"
     956    LogFile "------------------------------------"
    955957    cat $MY_FSTAB >> $LOGFILE
    956     echo "Your mountlist will look like this:" | tee -a $LOGFILE
    957     echo "-----------------------------------" >> $LOGFILE
     958    LogAll "Your mountlist will look like this:"
     959    LogAll "-----------------------------------"
    958960
    959961# scratchdir, mountlist(OUT)
     
    11871189            echo $current_lvolume | grep -q ' '
    11881190            if [ $? -eq 0 ]; then
    1189                 echo "WARNING: Multiple Logical Volumes found. Report to dev team" >> $LOGFILE 
     1191                LogFile "WARNING: Multiple Logical Volumes found. Report to dev team"
    11901192            fi
    11911193            # if it's not found, it may well be a real device such as a multipath one
     
    12181220                    [ "$items" -gt "0" ] && partition_size=$(($totalsize/$items)) || partition_size=0
    12191221                    [ "$partition_size" -lt "125000" ] && partition_size=125000
    1220                     echo "I'm guessing $c_p is $(($partition_size/1024))MB" >> $LOGFILE
     1222                    LogFile "I'm guessing $c_p is $(($partition_size/1024))MB"
    12211223                fi
    12221224            fi
     
    12361238        fi
    12371239        psz=$partition_size
    1238         echo "Examining $current_partition (mount=$partition_mountpt fmt=$partition_format psz=$psz)" >> $LOGFILE
     1240        LogFile "Examining $current_partition (mount=$partition_mountpt fmt=$partition_format psz=$psz)"
    12391241        [ "$psz" != "lvm" ] && psz=$(($psz/1024))
    12401242        if [ "`echo " $IMAGE_DEVS " | grep -F " $current_partition "`" != "" ] ; then
     
    12441246            partition_size=$(($partition_size+1)); # just in case
    12451247            if [ "$partition_format" = "Linux" ] ; then
    1246                 echo "Are you imaging a mounted swap partition? Silly..." >> $LOGFILE
    1247                 echo "Reverting format from $old_partition_fmt to $partition_format" >> $LOGFILE
     1248                LogFile "Are you imaging a mounted swap partition? Silly..."
     1249                LogFile "Reverting format from $old_partition_fmt to $partition_format"
    12481250                partition_format=$old_partition_fmt
    12491251            fi
    12501252        fi
    12511253        if [ "$EXCLUDE_DEVS" ] && [ "`echo " $EXCLUDE_DEVS " | grep -F " $current_partition "`" ] || [ "`echo " $EXCLUDE_DEVS " | grep " $current_partition "`" ] ; then
    1252             echo "Excluding $current_partition from mountlist" >> $LOGFILE
     1254            LogFile "Excluding $current_partition from mountlist"
    12531255            continue
    12541256        fi
    12551257        if [ ! "$partition_mountpt" ] ; then
    1256             echo "------- $FDISK -l $qq log ------------" >> $LOGFILE
     1258            LogFile "------- $FDISK -l $qq log ------------"
    12571259            for qq in "" `find /dev/ida/c*d* ! -name '*p*' 2> /dev/null`; do
    12581260                partition_format=`$FDISK -l $qq 2>> $LOGFILE | grep -w "$c_p" | sed 's/12/|/' | tr -s '\t' ' ' | cut -d'|' -f2 | cut -d' ' -f2-9`
    12591261                [ "$partition_format" ] && break
    12601262            done
    1261             echo "------- $FDISK log end ------------" >> $LOGFILE
     1263            LogFile "------- $FDISK log end ------------"
    12621264            if [ "$partition_format" = "Compaq diagnostics" ] ; then
    12631265                partition_format="compaq"
    12641266            elif [ ! "`grep -F device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then
    1265                 LogIt "Unable to find mountpoint of $current_partition - ignoring"
     1267                LogAll "Unable to find mountpoint of $current_partition - ignoring"
    12661268                continue
    12671269            fi
     
    12761278        unofficial_outstring=`printf "\t%-15s %-15s %-15s %7s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$label"`
    12771279        if [ "$current_partition" = "" ] ; then
    1278             echo "Unknown partition (outstring = $unofficial_outstring)" >> $LOGFILE
     1280            LogFile "Unknown partition (outstring = $unofficial_outstring)"
    12791281        elif [ "$partition_mountpt" = "" ] && [ -f "/etc/raidtab" ] ; then
    12801282            if [ "`grep -F device /etc/raidtab 2>/dev/null | grep -F $current_partition`" ] ; then
     
    12841286                printf "%s %s %s %s %s %s\n" $current_partition $partition_mountpt $partition_format $partition_size "$label" >> $mountlist
    12851287            else
    1286                 echo "Unknown mountpoint (outstring = $unofficial_outstring)" >> $LOGFILE
     1288                LogFile "Unknown mountpoint (outstring = $unofficial_outstring)"
    12871289            fi
    12881290        elif [ "$partition_format" = "" ] ; then
    1289             echo "Unknown format (outstring = $unofficial_outstring)" >> $LOGFILE
     1291            LogFile "Unknown format (outstring = $unofficial_outstring)"
    12901292        elif [ "$partition_size" = "" ] ; then
    1291             echo "Unknown partition size (outstring = $unofficial_outstring)" >> $LOGFILE
     1293            LogFile "Unknown partition size (outstring = $unofficial_outstring)"
    12921294        elif [ "$partition_mountpt" = "/proc" ] || [ "$partition_mountpt" = "/dev/pts" ] ; then
    12931295            continue
    12941296        else
    12951297            if [ "$partition_format" = "dos" ] || [ "$partition_format" = "msdos" ] ; then
    1296                 echo "Stupid bastard..." >> $LOGFILE
     1298                LogFile "Stupid bastard..."
    12971299                partition_format="vfat"
    12981300            fi
     
    13221324    rm -Rf $MINDI_TMP/iso
    13231325    mkdir -p $MINDI_TMP/iso/{images,archives}
    1324     cp -f $MINDI_CACHE/{*.gz,*.img} $MINDI_TMP/iso/images 2>> $LOGFILE || LogIt "OfferToMakeBootableISO: Cannot copy $MINDI_CACHE/*.gz to $MINDI_TMP/iso/images"
    1325     echo "mindi_lib = $MINDI_LIB" >> $LOGFILE
     1326    cp -f $MINDI_CACHE/{*.gz,*.img} $MINDI_TMP/iso/images 2>> $LOGFILE || LogAll "OfferToMakeBootableISO: Cannot copy $MINDI_CACHE/*.gz to $MINDI_TMP/iso/images"
     1327    LogFile "mindi_lib = $MINDI_LIB"
    13261328    for i in memdisk memtest.bin memtest.img ; do
    13271329        j=$MINDI_LIB/$i
    13281330        k=$MINDI_TMP/iso
    13291331        if [ -e "$j" ] ; then
    1330             LogIt "Copying $j to $k"
     1332            LogAll "Copying $j to $k"
    13311333            cp -f $j $k 2>> $LOGFILE || Die "Failed to copy $j to $k"
    13321334            cp -f $j $MINDI_TMP 2>> $LOGFILE || Die "Failed to copy $j to $MINDI_TMP"
     
    13601362    fi
    13611363    if [ "$?" -ne "0" ] ; then
    1362         echo "----------- $ISO_CMD's errors --------------" >> $LOGFILE
     1364        LogFile "----------- $ISO_CMD's errors --------------"
    13631365        cat $MINDI_TMP/mkisofs.log >> $LOGFILE
    13641366        echo "$ISO_CMD returned the following errors:-"
    13651367        cat $MINDI_TMP/mkisofs.log
    1366         LogIt "Failed to create ISO image."
    1367     else
    1368         echo "Created bootable ISO image at $MINDI_CACHE/mindi.iso" | tee -a $LOGFILE
     1368        LogAll "Failed to create ISO image."
     1369    else
     1370        LogAll "Created bootable ISO image at $MINDI_CACHE/mindi.iso"
    13691371    fi
    13701372    rm -f $MINDI_TMP/mkisofs.log
     
    13951397    echo -en "Transforming $USBDEVICE in a Bootable device "
    13961398    echo -en "."
    1397     echo "Transforming $USBDEVICE in a Bootable device"  >> $LOGFILE
    1398     echo "Checking $USBDEVICE" >> $LOGFILE
     1399    LogFile "Transforming $USBDEVICE in a Bootable device" 
     1400    LogFile "Checking $USBDEVICE"
    13991401    $FDISK -l $USBDEVICE 2>> $LOGFILE 1>> $LOGFILE
    14001402    if [ $? -ne 0 ]; then
    1401         echo "Unable to access $USBDEVICE" | tee -a $LOGFILE
    1402         echo "Make sure your USB device is pluged in" | tee -a $LOGFILE
     1403        LogAll "Unable to access $USBDEVICE"
     1404        LogAll "Make sure your USB device is pluged in"
    14031405        exit -1
    14041406    fi
    14051407    echo -en "."
    1406     echo "Unmounting $USBDEVICE just in case" >> $LOGFILE
     1408    LogFile "Unmounting $USBDEVICE just in case"
    14071409    umount $USBPART 2>> $LOGFILE 1>> $LOGFILE
    14081410    # If your key has no MBR it may cause an issue
    14091411    # Use dd if=mbr.bin of=$USBDEVICE or ms-sys -s $USBDEVICE
    1410     echo "Preparing $USBDEVICE" >> $LOGFILE
     1412    LogFile "Preparing $USBDEVICE"
    14111413    $FDISK $USBDEVICE 2>> $LOGFILE 1>> $LOGFILE << EOF
    14121414d
     
    14261428EOF
    14271429    if [ $? -ne 0 ]; then
    1428         echo "Unable to create a vfat Filesystem on $USBDEVICE" | tee -a $LOGFILE
    1429         echo "Make sure your USB device is pluged in" | tee -a $LOGFILE
     1430        LogAll "Unable to create a vfat Filesystem on $USBDEVICE"
     1431        LogAll "Make sure your USB device is pluged in"
    14301432        $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE
    14311433        MindiExit -1
    14321434    fi
    1433     echo "The USB device $USBDEVICE now looks like this:" >> $LOGFILE
     1435    LogFile "The USB device $USBDEVICE now looks like this:"
    14341436    $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE
    14351437    echo -en "."
    1436     echo "Creating a vfat filesystem on $USBPART" >> $LOGFILE
     1438    LogFile "Creating a vfat filesystem on $USBPART"
    14371439    mkdosfs -F 32 $USBPART 2>&1 >> $LOGFILE
    14381440    if [ $? -ne 0 ]; then
    1439         echo "Unable to create a vfat filesystem on $USBPART" | tee -a $LOGFILE
    1440         echo "Make sure your USB device is pluged in and partitioned ($USBPART must exist on it)" | tee -a $LOGFILE
     1441        LogAll "Unable to create a vfat filesystem on $USBPART"
     1442        LogAll "Make sure your USB device is pluged in and partitioned ($USBPART must exist on it)"
    14411443        $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE
    14421444        MindiExit -1
    14431445    fi
    14441446    echo -en "."
    1445     echo "Mounting $USBPART on $MINDI_TMP/usb" >> $LOGFILE
     1447    LogFile "Mounting $USBPART on $MINDI_TMP/usb"
    14461448    mount $USBPART $MINDI_TMP/usb 2>> $LOGFILE
    14471449    if [ $? -ne 0 ]; then
    1448         echo "Unable to mount $USBPART on $MINDI_TMP/usb" | tee -a $LOGFILE
    1449         echo "Make sure your USB device is pluged in, partitioned and formated ($USBPART must exist on it)" | tee -a $LOGFILE
     1450        LogAll "Unable to mount $USBPART on $MINDI_TMP/usb"
     1451        LogAll "Make sure your USB device is pluged in, partitioned and formated ($USBPART must exist on it)"
    14501452        $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE
    14511453        MindiExit -1
     
    14531455    echo -en "."
    14541456    mkdir -p $MINDI_TMP/usb/images
    1455     cp -f $MINDI_CACHE/*.img $MINDI_CACHE/*.gz $MINDI_TMP/usb/images 2>> $LOGFILE || LogIt "OfferToMakeBootableUSB: Cannot copy $i to $MINDI_TMP/usb/images"
     1457    cp -f $MINDI_CACHE/*.img $MINDI_CACHE/*.gz $MINDI_TMP/usb/images 2>> $LOGFILE || LogAll "OfferToMakeBootableUSB: Cannot copy $i to $MINDI_TMP/usb/images"
    14561458    echo -en "."
    1457     echo "mindi_lib = $MINDI_LIB" >> $LOGFILE
     1459    LogFile "mindi_lib = $MINDI_LIB"
    14581460    for i in memdisk memtest.bin memtest.img ; do
    14591461        j=$MINDI_LIB/$i
    14601462        k=$MINDI_TMP/usb
    14611463        if [ -e "$j" ] ; then
    1462             LogIt "Copying $j to $k"
     1464            LogAll "Copying $j to $k"
    14631465            cp -f $j $k 2>> $LOGFILE || Die "Failed to copy $j to $k"
    14641466            cp -f $j $MINDI_TMP 2>> $LOGFILE || Die "Failed to copy $j to $MINDI_TMP"
     
    14781480        syslinux -s $USBPART 2>> $MINDI_TMP/syslinux.log
    14791481        if [ "$?" -ne "0" ] ; then
    1480             echo "----------- syslinux's errors --------------" |tee -a $LOGFILE
     1482            LogAll "----------- syslinux's errors --------------" |tee -a $LOGFILE
    14811483            cat $MINDI_TMP/syslinux.log |tee -a $LOGFILE
    1482             LogIt "Failed to create USB image."
     1484            LogAll "Failed to create USB image."
    14831485        else
    14841486            echo -e "$DONE"
    1485             echo "Created bootable USB image on $USBDEVICE" >> $LOGFILE
     1487            LogFile "Created bootable USB image on $USBDEVICE"
    14861488        fi
    14871489        rm -f $MINDI_TMP/syslinux.log
    14881490    else
    1489         echo "No USB boot support for ia64" | tee -a $LOGFILE
     1491        echo "No USB boot support for ia64"
    14901492        MindiExit -1
    14911493    fi
     
    16311633    dd if=/dev/zero of=$imagefile bs=1k count=$BOOT_SIZE &> /dev/null || Die "Cannot dd blank file"
    16321634    mkdosfs $imagefile >> $LOGFILE 2>> $LOGFILE
    1633     mount -t vfat -o loop $imagefile $mountpoint || LogIt "Cannot mount (PBDI)"
     1635    mount -t vfat -o loop $imagefile $mountpoint || LogAll "Cannot mount (PBDI)"
    16341636    # copy Mindi's skeleton fs & lilo/syslinux/whatever stuff into it
    16351637    mkdir -p $mountpoint/etc
     
    16561658    fi
    16571659
    1658     echo "Copying $MINDI_TMP/initrd.img to $mountpoint..." >> $LOGFILE
     1660    LogFile "Copying $MINDI_TMP/initrd.img to $mountpoint..."
    16591661    cp -f $MINDI_TMP/initrd.img $mountpoint 2>> $LOGFILE
    16601662    if [ "$?" -ne "0" ] ; then
    1661         LogIt "Failed to copy $MINDI_TMP/initrd.img to $mountpoint"
     1663        LogAll "Failed to copy $MINDI_TMP/initrd.img to $mountpoint"
    16621664        cat $MINDI_TMP/mtpt.$$ >> $LOGFILE
    1663         LogIt "Please unload some of your modules and try again."
     1665        LogAll "Please unload some of your modules and try again."
    16641666        rm -f $MINDI_TMP/mtpt.$$
    1665         LogIt "Cannot incorporate initrd.img in bootdisk (kernel / modules too big?)"
     1667        LogAll "Cannot incorporate initrd.img in bootdisk (kernel / modules too big?)"
    16661668        retval=$(($retval+1))
    16671669    fi
     
    16791681    cp -f $kernelpath $mountpoint/vmlinuz > /dev/null 2>> $LOGFILE
    16801682    if [ "$?" -ne "0" ] ; then
    1681         echo "Files at mountpoint ($mountpoint) :-" >> $LOGFILE
     1683        LogFile "Files at mountpoint ($mountpoint) :-"
    16821684        du -sk $mountpoint/* >> $LOGFILE
    1683         echo "--- end of list of files ---" >> $LOGFILE
     1685        LogFile "--- end of list of files ---"
    16841686        echo -en "Kernel size = `du -sk $kernelpath | cut -f1` K\nRamdisk free = $free_space K\n\
    16851687Sorry, your kernel is too big for your image.\n" >> $LOGFILE
     
    16871689        cd $old_pwd
    16881690        umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)"
    1689         rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)"
     1691        rmdir $mountpoint || LogAll "Cannot rmdir (PBDI)"
    16901692    #   losetup /dev/loop0 -d
    16911693        [ "$imagefile" != "" ] && rm -f $imagefile
     
    16941696    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    16951697    max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`))
    1696     echo "Free space left on image = $free_space KB" >> $LOGFILE
    1697     echo "Max kernel size on $BOOT_SIZE KB image (est'd) = $max_kernel_size K" >> $LOGFILE
     1698    LogFile "Free space left on image = $free_space KB"
     1699    LogFile "Max kernel size on $BOOT_SIZE KB image (est'd) = $max_kernel_size K"
    16981700    # make it bootable
    16991701    [ "$mountpoint" != "" ] && rm -f $mountpoint/zero
    17001702    [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2>> $LOGFILE
    17011703    if [ "$KERN_DISK_MADE" ] ; then
    1702         echo "Not running LILO. It's not that kind of disk." >> $LOGFILE
     1704        LogFile "Not running LILO. It's not that kind of disk."
    17031705    fi
    17041706
     
    17061708    umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)"
    17071709    echo -en "..."
    1708     rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)"
     1710    rmdir $mountpoint || LogAll "Cannot rmdir (PBDI)"
    17091711    if [ "$retval" -eq "0" ] ; then
    17101712        echo -en "...$DONE\n"
    17111713        if [ "$KERN_DISK_MADE" ] ; then
    1712             LogIt "$BOOT_SIZE KB boot disks were created OK\n"
     1714            LogAll "$BOOT_SIZE KB boot disks were created OK\n"
    17131715        fi
    17141716    else
    17151717        echo -en "...failed\n"
    1716         LogIt $BOOT_SIZE"KB boot disk was NOT created\n"
     1718        LogAll $BOOT_SIZE"KB boot disk was NOT created\n"
    17171719        [ "$imagefile" != "" ] && rm -f $imagefile
    17181720    fi
    1719     [ "$retval" -ne "0" ] && LogIt "PrepareBootDiskImage() is returning nonzero"
     1721    [ "$retval" -ne "0" ] && LogAll "PrepareBootDiskImage() is returning nonzero"
    17201722    return $retval
    17211723}
     
    17381740    mkdir -p $mountpoint
    17391741    dd if=/dev/zero of=$imagefile bs=1k count=$BOOT_SIZE &> /dev/null || Die "Cannot dd blank file"
    1740     echo "Creating vfat filesystem on $imagefile" >> $LOGFILE
     1742    LogFile "Creating vfat filesystem on $imagefile"
    17411743    mkfs.vfat $imagefile >> $LOGFILE 2>> $LOGFILE
    17421744    # syslinux should be run on a  local file (doen't work through NFS Cf: #297)
     
    17471749    imagefile=$imagesdir/mindi-bootroot.$BOOT_SIZE.img
    17481750
    1749     mount -t vfat -o loop $imagefile $mountpoint || LogIt "Cannot mount (PBDI)"
     1751    mount -t vfat -o loop $imagefile $mountpoint || LogAll "Cannot mount (PBDI)"
    17501752
    17511753    # copy Mindi's skeleton fs & lilo/syslinux/whatever stuff into it
    17521754    MakeMessageFile > $mountpoint/message.txt
    17531755    MakeBootConfFile isolinux > $mountpoint/syslinux.cfg
    1754     echo "Copying $MINDI_TMP/initrd.img to $mountpoint/initrd.img..." >> $LOGFILE
     1756    LogFile "Copying $MINDI_TMP/initrd.img to $mountpoint/initrd.img..."
    17551757    cp -f $MINDI_TMP/initrd.img $mountpoint/initrd.img 2>> $LOGFILE
    17561758    if [ "$?" -ne "0" ] ; then
    1757         LogIt "Failed to copy $MINDI_TMP/initrd.img to $mountpoint"
     1759        LogAll "Failed to copy $MINDI_TMP/initrd.img to $mountpoint"
    17581760        cat $MINDI_TMP/mtpt.$$ >> $LOGFILE
    1759         LogIt "Please unload some of your modules and try again."
     1761        LogAll "Please unload some of your modules and try again."
    17601762        rm -f $MINDI_TMP/mtpt.$$
    1761         LogIt "Cannot incorporate initrd.img in bootdisk (kernel / modules too big?)"
     1763        LogAll "Cannot incorporate initrd.img in bootdisk (kernel / modules too big?)"
    17621764        retval=$(($retval+1))
    17631765    fi
     
    17741776    cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null
    17751777    if [ "$?" -ne "0" ] ; then
    1776         echo "Files at mountpoint ($mountpoint) :-" >> $LOGFILE
     1778        LogFile "Files at mountpoint ($mountpoint) :-"
    17771779        du -sk $mountpoint/* >> $LOGFILE
    1778         echo "--- end of list of files ---" >> $LOGFILE
     1780        LogFile "--- end of list of files ---"
    17791781        echo -en "Kernel size = `du -sk $kernelpath | cut -f1` K\nRamdisk free = $free_space K\n\
    17801782Sorry, your kernel is too big for your image.\n" >> $LOGFILE
     
    17821784        cd $old_pwd
    17831785        umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)"
    1784         rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)"
     1786        rmdir $mountpoint || LogAll "Cannot rmdir (PBDI)"
    17851787
    17861788        [ "$imagefile" != "" ] && rm -f $imagefile
     
    17891791    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    17901792    max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`))
    1791     echo "Free space left on image = $free_space KB" >> $LOGFILE
    1792     echo "Max kernel size on $BOOT_SIZE KB image (est'd) = $max_kernel_size K" >> $LOGFILE
     1793    LogFile "Free space left on image = $free_space KB"
     1794    LogFile "Max kernel size on $BOOT_SIZE KB image (est'd) = $max_kernel_size K"
    17931795
    17941796    # make it bootable
     
    17981800    umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)"
    17991801    echo -en "..."
    1800     rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)"
     1802    rmdir $mountpoint || LogAll "Cannot rmdir (PBDI)"
    18011803
    18021804    if [ "$retval" -eq "0" ] ; then
     
    18041806        if [ "$KERN_DISK_MADE" ] ; then
    18051807            [ "$imagefile" != "" ] && rm -f $imagefile
    1806             LogIt "$BOOT_SIZE KB boot disks were created OK\n"
     1808            LogAll "$BOOT_SIZE KB boot disks were created OK\n"
    18071809        fi
    18081810    else
    18091811        echo -en "...failed\n"
    1810         LogIt $BOOT_SIZE"KB boot disk was NOT created\n"
     1812        LogAll $BOOT_SIZE"KB boot disk was NOT created\n"
    18111813        [ "$imagefile" != "" ] && rm -f $imagefile
    18121814    fi
    1813     [ "$retval" -ne "0" ] && LogIt "PrepareBootDiskImage() is returning nonzero"
     1815    [ "$retval" -ne "0" ] && LogAll "PrepareBootDiskImage() is returning nonzero"
    18141816    return $retval
    18151817}
     
    18621864        for i in $EXTRA_MODS ; do
    18631865            j=`find lib/modules/$FAILSAFE_KVER -name $i.*o.gz 2> /dev/null`
    1864             [ ! "$j" ] && echo "WARNING - cannot find failsafe module $i.o.gz" >> $LOGFILE
     1866            [ ! "$j" ] && LogFile "WARNING - cannot find failsafe module $i.o.gz"
    18651867            for k in $j ; do
    1866                 tar cf - $k 2>> $MINDI_TMP/$$.log | (cd $bigdir ; tar xf -) || LogIt "ERROR on module $k" $MINDI_TMP/$$.log
    1867                 echo "Added failsafe module $k to ramdisk" >> $LOGFILE
     1868                tar cf - $k 2>> $MINDI_TMP/$$.log | (cd $bigdir ; tar xf -) || LogAll "ERROR on module $k" $MINDI_TMP/$$.log
     1869                LogFile "Added failsafe module $k to ramdisk"
    18681870            done
    18691871        done
     
    18961898    i=`cat $MINDI_TMP/BOOTLOADER.DEVICE 2> /dev/null`
    18971899    if [ "$i" ] ; then
    1898         LogIt "Backing up $i's MBR"
     1900        LogAll "Backing up $i's MBR"
    18991901        dd if=$i of=$bigdir/BOOTLOADER.MBR bs=446 count=1 >> $LOGFILE 2>> $LOGFILE
    19001902        sleep 1
     
    19021904        j=$i
    19031905        [ -h "$j" ] && j=`readlink -f $j`
    1904         LogIt "Creating /dev/boot_device ($j)"
     1906        LogAll "Creating /dev/boot_device ($j)"
    19051907        mkdir -p $bigdir/dev
    19061908        cp -pRdf $j $bigdir/dev/boot_device 2>> $LOGFILE || Die "Unable to create /dev/boot_device on ramdisk"
     
    19141916    if [ -d /$ti ]; then
    19151917        mkdir -p $ti
    1916         cp -Rdf /$ti/* $ti 2>> $LOGFILE || LogIt "WARNING - error occurred while copying terminfo"
     1918        cp -Rdf /$ti/* $ti 2>> $LOGFILE || LogAll "WARNING - error occurred while copying terminfo"
    19171919    fi
    19181920    if [ -e "$MONDO_SHARE/restore-scripts" ]; then
     
    19211923    fi
    19221924    if [ -d "/lib/dev-state" ]; then
    1923         tar cf - -C / ./lib/dev-state 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "Unable to handle /lib/dev-state" $MINDI_TMP/$$.log
     1925        tar cf - -C / ./lib/dev-state 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Unable to handle /lib/dev-state" $MINDI_TMP/$$.log
    19241926    fi
    19251927    cd $old_pwd
     
    19511953    echo -en "Tarring and zipping the data content..."
    19521954    size_of_all_tools=`du -sk $bigdir | cut -f1`
    1953     (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)
     1955    (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)
    19541956    du -sk $imagesdir/*gz >> $LOGFILE
    19551957    echo -e "$DONE"
     
    20572059    $AWK '{if (substr($0,0,1)!="#" || substr($0,0,3)=="#!/") {print $0;};}' $tempfile > $1
    20582060    rm -f $tempfile
    2059     echo "Stripped comments from $2" >> $LOGFILE
     2061    LogFile "Stripped comments from $2"
    20602062}
    20612063
     
    20722074    if [ "$?" -eq "0" ] ; then
    20732075        cp -f $tmpfile $1 2>> $LOGFILE
    2074         echo "Stripped binary $2" >> $LOGFILE
     2076        LogFile "Stripped binary $2"
    20752077    fi
    20762078    rm -f $tmpfile
     
    21172119            # Used by ia64
    21182120            if [ "`gzip -cd $fname | strings 2> /dev/null | grep -F "$kdate"`" = "" ] ; then
    2119                 LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting? Naughty but I'll allow it..."
     2121                LogAll "Have you recompiled your kernel \"$fname\" w/o rebooting? Naughty but I'll allow it..."
    21202122                duff_kernels="$fname $duff_kernels"
    21212123            else
     
    21252127        else
    21262128            if [ "`strings $fname 2> /dev/null | grep -F "$kdate"`" = "" ] ; then
    2127                 LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting?\n Naughty but I'll allow it..."
     2129                LogAll "Have you recompiled your kernel \"$fname\" w/o rebooting?\n Naughty but I'll allow it..."
    21282130                duff_kernels="$fname $duff_kernels"
    21292131            else
     
    21372139    fi
    21382140    if [ ! "$possible_kernels" ] ; then
    2139         LogIt "No kernel matches exactly. Are there any duff kernels?"
     2141        LogAll "No kernel matches exactly. Are there any duff kernels?"
    21402142        possible_kernels="$duff_kernels"
    21412143        if [ ! "$possible_kernels" ] ; then
    2142             LogIt "Sorry, no duff kernels either"
     2144            LogAll "Sorry, no duff kernels either"
    21432145        else
    2144             LogIt "I bet you're running Debian or Gentoo, aren't you?"
    2145             LogIt "Your kernel doesn't have a sane builddate. Oh well..."
     2146            LogAll "I bet you're running Debian or Gentoo, aren't you?"
     2147            LogAll "Your kernel doesn't have a sane builddate. Oh well..."
    21462148        fi
    21472149    fi
     
    21492151    noof_kernels=`CountItemsIn "$possible_kernels"`
    21502152    if [ "$noof_kernels" -eq "0" ] ; then
    2151         LogIt "Could not find your kernel."
     2153        LogAll "Could not find your kernel."
    21522154        if [ -e "/boot/vmlinuz" ] ; then
    2153             LogIt "Using /boot/vmlinuz as a last resort."
     2155            LogAll "Using /boot/vmlinuz as a last resort."
    21542156            output=/boot/vmlinuz
    21552157        else
     
    21582160    elif [ "$noof_kernels" -eq "1" ] ; then
    21592161        kernelpath=`echo "$possible_kernels" | sed s/' '//`
    2160         echo "Your kernel is $kernelpath (v$KERVERRUN)" >> $LOGFILE
     2162        LogFile "Your kernel is $kernelpath (v$KERVERRUN)"
    21612163        output="$kernelpath"
    21622164    else
    21632165        for i in $possible_kernels ; do
    21642166            if echo $i | grep "$KERVERRUN" ; then
    2165                 LogIt "OK, I used my initiative and found that "
    2166                 LogIt "$i is probably your kernel. "
     2167                LogAll "OK, I used my initiative and found that "
     2168                LogAll "$i is probably your kernel. "
    21672169                output="$i"
    21682170                return
     
    21712173        if echo " $possible_kernels " | grep -F "/boot/vmlinuz " &> /dev/null ; then
    21722174            output=/boot/vmlinuz
    2173             echo "Schlomo, this one's for you." >> $LOGFILE
     2175            LogFile "Schlomo, this one's for you."
    21742176        else
    2175             LogIt "Two or more possible kernels found. You may specify any one of them and the "
    2176             LogIt "boot disks will still work, probably. If one does not work, try another."
    2177             LogIt "$possible_kernels"
     2177            LogAll "Two or more possible kernels found. You may specify any one of them and the "
     2178            LogAll "boot disks will still work, probably. If one does not work, try another."
     2179            LogAll "$possible_kernels"
    21782180            echo ""
    21792181        fi
     
    21972199    dd if=/dev/zero of=$tempfile bs=1k count=$ramdisk_size &> /dev/null || Die "Not enough room for temporary ramdisk (TurnTgzIntoRdz)"
    21982200    echo -en "..."
    2199     echo "Creating ext2 filesystem on $tempfile" >> $LOGFILE
     2201    LogFile "Creating ext2 filesystem on $tempfile"
    22002202    mke2fs -b 1024 -m 1 -i 2048 -F $tempfile >> $LOGFILE 2>> $LOGFILE || Die "Unable to create an ext2 file system on $tempfile"
    22012203    echo -en "..."
     
    22082210    # AL04Oct08: Check whether /lib64 is a link and if so explicitly create one in rootfs
    22092211    if [ -h "/lib64" ]; then
    2210         mkdir -p lib || LogIt "Unable to create lib in $mountpoint."
    2211         ln -s lib lib64 || LogIt "/lib64 is a symbolic link, but I couldn't create it in $mountpoint."
     2212        mkdir -p lib || LogAll "Unable to create lib in $mountpoint."
     2213        ln -s lib lib64 || LogAll "/lib64 is a symbolic link, but I couldn't create it in $mountpoint."
    22122214    fi
    22132215
     
    22402242            fi
    22412243        done
    2242         tar cf - $mountlis `sort -u $MINDI_TMP/busy.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "Problem in mount analysis" $MINDI_TMP/$$.log
     2244        tar cf - $mountlis `sort -u $MINDI_TMP/busy.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in mount analysis" $MINDI_TMP/$$.log
    22432245        rm -f $MINDI_TMP/busy.lis
    22442246    fi
     
    22552257    if [ $? -eq 0 ]; then
    22562258        echo "udev device manager found" > $mountpoint/tmp/USE-UDEV
    2257         LogIt "udev device manager found"
    2258         tar cf - -C / /etc/udev 2>> $MINDI_TMP/$$.log | tar xf -  || LogIt "Problem in /etc/udev analysis" $MINDI_TMP/$$.log
     2259        LogAll "udev device manager found"
     2260        tar cf - -C / /etc/udev 2>> $MINDI_TMP/$$.log | tar xf -  || LogAll "Problem in /etc/udev analysis" $MINDI_TMP/$$.log
    22592261        # This avoids NIC remapping if on another machine at restore time on Debian at least
    22602262        rm -f ./etc/udev/rules.d/z[0-9][0-9]_persistent-net.rules
    22612263        # This avoids NIC remapping if on another machine at restore time on Ubuntu at least
    22622264        rm -f ./etc/udev/rules.d/[0-9][0-9]-persistent-net.rules
    2263         tar cf - -C / /lib*/udev 2>> $MINDI_TMP/$$.log | tar xf -  || LogIt "Problem in /lib/udev analysis" $MINDI_TMP/$$.log
     2265        tar cf - -C / /lib*/udev 2>> $MINDI_TMP/$$.log | tar xf -  || LogAll "Problem in /lib/udev analysis" $MINDI_TMP/$$.log
    22642266        if [ -x /sbin/udevd ]; then
    22652267            lis2=`grep -Ev '^#' $MINDI_CONF/udev.files`
     
    22872289                fi
    22882290            done
    2289             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
     2291            tar cf - -C / $lis `sort -u $MINDI_TMP/udev.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in udev.lis analysis" $MINDI_TMP/$$.log
    22902292            rm -f $MINDI_TMP/udev.lis
    22912293        else
    2292             echo "udevd daemon not in standard place (/sbin)" 2>&1 | tee -a $LOGFILE
    2293             echo "mindi will use static devices which may cause problems" 2>&1 | tee -a $LOGFILE
     2294            LogAll "udevd daemon not in standard place (/sbin)"
     2295            LogAll "mindi will use static devices which may cause problems"
    22942296            rm -f $mountpoint/tmp/USE-UDEV
    22952297        fi
     
    23002302    mindi-bkphw $MINDI_CACHE $MINDI_CONF | tee -a $LOGFILE
    23012303    if [ -d $MINDI_CACHE/bkphw ]; then
    2302         LogIt "Hardware Information found and saved ..."
     2304        LogAll "Hardware Information found and saved ..."
    23032305        cp -rp $MINDI_CACHE/bkphw .
    23042306        if [ -f $MINDI_CACHE/tools.files ]; then
    23052307            lis=`grep -Ev '^#' $MINDI_CACHE/tools.files`
    23062308            LocateDeps $lis > $MINDI_TMP/tools.lis
    2307             tar cf - $lis `sort -u $MINDI_TMP/tools.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "Problem in tools.lis analysis" $MINDI_TMP/$$.log
     2309            tar cf - $lis `sort -u $MINDI_TMP/tools.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in tools.lis analysis" $MINDI_TMP/$$.log
    23082310        fi
    23092311        if [ -f $MINDI_CACHE/mindi-rsthw ]; then
     
    23162318    # Management of perl scripts delivered needed at restore time
    23172319    mindi-get-perl-modules `cat $MINDI_CONF/perl-scripts` > $MINDI_TMP/perl.lis
    2318     tar cf - `cat $MINDI_TMP/perl.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "Problem in perl scripts analysis" $MINDI_TMP/$$.log
     2320    tar cf - `cat $MINDI_TMP/perl.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in perl scripts analysis" $MINDI_TMP/$$.log
    23192321
    23202322    for w in cdrom groovy-stuff ; do
     
    23222324    done
    23232325
    2324     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
     2326    tar cf - -C / /dev/fd0*[1,2][4,7,8]* 2>> $MINDI_TMP/$$.log | tar xf -  || LogAll "Problem in fd dev analysis" $MINDI_TMP/$$.log
    23252327
    23262328    cd $old_pwd
     
    23512353    fi
    23522354    for i in $DENY_MODS; do
    2353         echo "Removing $i from the list of modules to load" >> $LOGFILE
     2355        LogFile "Removing $i from the list of modules to load"
    23542356        list_of_groovy_mods=`echo ${list_of_groovy_mods} | tr ' ' '\n' | grep -Ev "^${i}$" | tr '\n' ' '`
    23552357    done
    23562358
    2357     [ -e "$needed_modules_path" ] || LogIt "path $needed_modules_path does not exist.\n If you're not using a modular kernel then you're NUTS."
     2359    [ -e "$needed_modules_path" ] || LogAll "path $needed_modules_path does not exist.\n If you're not using a modular kernel then you're NUTS."
    23582360    for i in $list_of_groovy_mods ; do
    23592361        needed_modules="$needed_modules `FindSpecificModuleInPath $needed_modules_path $i`"
     
    23632365        [ -e "$i" ] && s=`du -sk $i | cut -f1` || s=""
    23642366        [ "$YOUR_KERNEL_SUCKS" ] && i=$MINDI_TMP/$i
    2365         echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE
    2366         tar cf - -C / $i 2>> $MINDI_TMP/$$.log | (cd $mountpoint ; tar xf -) || LogIt "Unable to copy $i to $mountpoint" $MINDI_TMP/$$.log
     2367        LogFile "Adding $i ($s KB) to the rootfs"
     2368        tar cf - -C / $i 2>> $MINDI_TMP/$$.log | (cd $mountpoint ; tar xf -) || LogAll "Unable to copy $i to $mountpoint" $MINDI_TMP/$$.log
    23672369        # Uncompress modules if not using udev and native modprobe
    23682370        if [ ! -f $mountpoint/tmp/USE-UDEV ]; then
    23692371            if [ "`echo "$i" | grep -F ".gz"`" ]; then
    2370                 echo "Uncompressing $i" >> $LOGFILE
     2372                LogFile "Uncompressing $i"
    23712373                gunzip -f $mountpoint/$i
    23722374            fi
     
    23752377
    23762378    # Also copy modules.dep in case of udev so that normal modprobe works
    2377     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
     2379    tar cf - -C / /$needed_modules_path/modules.dep 2>> $MINDI_TMP/$$.log | (cd $mountpoint ; tar xf -) || LogAll "Unable to copy modules.dep to $mountpoint" $MINDI_TMP/$$.log
    23782380
    23792381    if [ ! -e "/sbin/devfsd" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then
    2380         echo "Deleting devfsd daemon from ramdisk" >> $LOGFILE
    2381         [ ! -e "/sbin/devfsd" ] && echo "...because /sbin/devfsd not found" >> $LOGFILE
    2382         [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] && echo "...because kernel is failsafe" >> $LOGFILE
     2382        LogFile "Deleting devfsd daemon from ramdisk"
     2383        [ ! -e "/sbin/devfsd" ] && LogFile "...because /sbin/devfsd not found"
     2384        [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] && LogFile "...because kernel is failsafe"
    23832385        rm -f $mountpoint/sbin/devfsd
    23842386    fi
     
    24022404    echo "$BOOT_SIZE" > $mountpoint/tmp/$BOOT_SIZE.siz
    24032405    # Determine what filesystem to use for initrd image
    2404     echo "Call GetInitrdFilesystemToUse() with parameter ${kernelpath} to get filesystem to use for initrd." >> $LOGFILE
     2406    LogFile "Call GetInitrdFilesystemToUse() with parameter ${kernelpath} to get filesystem to use for initrd."
    24052407    gvFileSystem=`GetInitrdFilesystemToUse ${kernelpath}`
    24062408    [ -z  gvFileSystem ] && Die "GetFilesystemToUse() failed. Terminating."
     
    24082410    "ext2fs")
    24092411        # say what will be used
    2410         echo "Creating an ext2 initrd image..." >> $LOGFILE
     2412        LogFile "Creating an ext2 initrd image..."
    24112413        # kernel expects linuxrc in ext2 filesystem
    24122414        ( cd $mountpoint && ln -sf sbin/init linuxrc )
     
    24192421        rm -f ${rdz_fname}.tmp
    24202422        # log that we are done
    2421         echo "...done." >> $LOGFILE
     2423        LogFile "...done."
    24222424    ;;
    24232425    "initramfs")
    24242426        # say what will be used
    2425         echo "Creating a gzip'ed cpio (AKA initramfs) initrd image..." >> $LOGFILE
     2427        LogFile "Creating a gzip'ed cpio (AKA initramfs) initrd image..."
    24262428        # make sure that cpio is there
    24272429        which cpio &> /dev/null; [ $? -eq 0 ] || Die "cpio not found. Please install package cpio and try again."
     
    24352437        umount $mountpoint || Die "Cannot unmount $tempfile"
    24362438        # log that we are done
    2437         echo "...done." >> $LOGFILE
     2439        LogFile "...done."
    24382440    ;;
    24392441    *)
     
    24712473
    24722474> $LOGFILE
    2473 echo "mindi v$MINDI_VERSION" >> $LOGFILE
    2474 echo "$ARCH architecture detected" >> $LOGFILE
    2475 echo "mindi called with the following arguments:" >> $LOGFILE
    2476 echo "$@" >> $LOGFILE
    2477 echo "Start date : `date`" >> $LOGFILE
    2478 echo "-----------------------------" >> $LOGFILE
     2475LogFile "mindi v$MINDI_VERSION"
     2476LogFile "$ARCH architecture detected"
     2477LogFile "mindi called with the following arguments:"
     2478LogFile "$@"
     2479LogFile "Start date : `date`"
     2480LogFile "-----------------------------"
    24792481
    24802482[ -e "/sbin/mkdosfs" ] && [ ! -e "/sbin/mkfs.vfat" ] && ln -sf /sbin/mkdosfs /sbin/mkfs.vfat
     
    24822484# Log some capital variables
    24832485[ "$MINDI_PREFIX" = "XXX" ] && Die "Mindi has not been installed correctly."
    2484 echo "MONDO_SHARE = $MONDO_SHARE" >> $LOGFILE
    2485 echo "MINDI_LIB = $MINDI_LIB" >> $LOGFILE
    2486 echo "MINDI_SBIN = $MINDI_SBIN" >> $LOGFILE
     2486LogFile "MONDO_SHARE = $MONDO_SHARE"
     2487LogFile "MINDI_LIB = $MINDI_LIB"
     2488LogFile "MINDI_SBIN = $MINDI_SBIN"
    24872489[ "$MINDI_CONF" = "YYY" ] && Die "Mindi has not been installed correctly."
    2488 echo "MINDI_CONF = $MINDI_CONF" >> $LOGFILE
     2490LogFile "MINDI_CONF = $MINDI_CONF"
    24892491if [ -f $MINDI_CONFIG ]; then
    2490     echo "-----------------------------" >> $LOGFILE
    2491     echo " Mindi configuration file    " >> $LOGFILE
    2492     echo "-----------------------------" >> $LOGFILE
     2492    LogFile "-----------------------------"
     2493    LogFile " Mindi configuration file    "
     2494    LogFile "-----------------------------"
    24932495    grep -Ev '^#' $MINDI_CONFIG >> $LOGFILE
    2494     echo "-----------------------------" >> $LOGFILE
     2496    LogFile "-----------------------------"
    24952497fi
    24962498
     
    25052507if which awk &> /dev/null ; then
    25062508    if ! which gawk &> /dev/null ; then
    2507         LogIt "You have awk but not gawk.\nPlease note that mindi works fine with a _sane_ awk binary.\nIf your awk binary misbehaves then please contact your vendor\nor distribution's mailing list for technical support.\n"
     2509        LogAll "You have awk but not gawk.\nPlease note that mindi works fine with a _sane_ awk binary.\nIf your awk binary misbehaves then please contact your vendor\nor distribution's mailing list for technical support.\n"
    25082510    fi
    25092511fi
     
    25172519    PATH=$PATH:/sbin:/usr/sbin
    25182520    export PATH
    2519     echo "Your PATH did not include /sbin or /usr/sbin. I have fixed that, temporarily." >> $LOGFILE
    2520     echo "However, you may wish to ask your vendor to provide a permanent fix..." >> $LOGFILE
    2521     echo " Or you might like to call 'su -' instead of 'su', for example." >> $LOGFILE
     2521    LogFile "Your PATH did not include /sbin or /usr/sbin. I have fixed that, temporarily."
     2522    LogFile "However, you may wish to ask your vendor to provide a permanent fix..."
     2523    LogFile " Or you might like to call 'su -' instead of 'su', for example."
    25222524fi
    25232525
     
    25262528    source $MINDI_LIB/FindDistroFailsafe
    25272529    # Log kernel image
    2528     LogIt "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)"
     2530    LogAll "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)"
    25292531else
    25302532    [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1`
     
    25722574fi
    25732575
    2574 echo "LVM set to $LVM" >> $LOGFILE
    2575 echo "----------" >> $LOGFILE
    2576 echo "mount result:" >> $LOGFILE
    2577 echo "-------------" >> $LOGFILE
     2576LogFile "LVM set to $LVM"
     2577LogFile "----------"
     2578LogFile "mount result:"
     2579LogFile "-------------"
    25782580mount >> $LOGFILE
    2579 echo "-------------" >> $LOGFILE
     2581LogFile "-------------"
    25802582if [ -e /etc/raidtab ]; then
    2581     echo "-------------" >> $LOGFILE
    2582     echo "/etc/raidtab content:" >> $LOGFILE
    2583     echo "-------------" >> $LOGFILE
     2583    LogFile "-------------"
     2584    LogFile "/etc/raidtab content:"
     2585    LogFile "-------------"
    25842586    cat /etc/raidtab >> $LOGFILE
    25852587fi
    2586 echo "-------------" >> $LOGFILE
    2587 echo "cat $CMDLINE" >> $LOGFILE
    2588 echo "-------------" >> $LOGFILE
     2588LogFile "-------------"
     2589LogFile "cat $CMDLINE"
     2590LogFile "-------------"
    25892591cat $CMDLINE >> $LOGFILE
    2590 echo "-------------" >> $LOGFILE
    2591 echo "cat /proc/swaps:" >> $LOGFILE
    2592 echo "-------------" >> $LOGFILE
     2592LogFile "-------------"
     2593LogFile "cat /proc/swaps:"
     2594LogFile "-------------"
    25932595cat /proc/swaps >> $LOGFILE
    2594 echo "-------------" >> $LOGFILE
    2595 echo "cat /proc/partitions:" >> $LOGFILE
    2596 echo "-------------" >> $LOGFILE
     2596LogFile "-------------"
     2597LogFile "cat /proc/partitions:"
     2598LogFile "-------------"
    25972599cat /proc/partitions >> $LOGFILE
    2598 echo "-------------" >> $LOGFILE
    2599 echo "cat /proc/filesystems:" >> $LOGFILE
    2600 echo "-------------" >> $LOGFILE
     2600LogFile "-------------"
     2601LogFile "cat /proc/filesystems:"
     2602LogFile "-------------"
    26012603cat /proc/filesystems >> $LOGFILE
    2602 echo "-------------" >> $LOGFILE
    2603 echo "lsmod result:" >> $LOGFILE
    2604 echo "-------------" >> $LOGFILE
     2604LogFile "-------------"
     2605LogFile "lsmod result:"
     2606LogFile "-------------"
    26052607lsmod >> $LOGFILE
    26062608MODULES="`cat /proc/modules | awk '{print $1}'`"
    26072609if [ -x /usr/sbin/esxcfg-module ]; then
    2608     echo "-------------" >> $LOGFILE
    2609     echo "VMWare ESX server detected - Enabling dedicated support" >> $LOGFILE
    2610     echo "-------------" >> $LOGFILE
    2611     echo "VMWare modules" >> $LOGFILE
    2612     echo "-------------" >> $LOGFILE
     2610    LogFile "-------------"
     2611    LogFile "VMWare ESX server detected - Enabling dedicated support"
     2612    LogFile "-------------"
     2613    LogFile "VMWare modules"
     2614    LogFile "-------------"
    26132615    /usr/sbin/esxcfg-module -l >> $LOGFILE
    26142616    MODULES="$MODULES `/usr/sbin/esxcfg-module -l | awk '{print $1}'`"
    26152617fi
    2616 echo "FORCE_MODS:" >> $LOGFILE
    2617 echo "-------------" >> $LOGFILE
    2618 echo $FORCE_MODS >> $LOGFILE
    2619 echo "-------------" >> $LOGFILE
    2620 echo "DENY_MODS:" >> $LOGFILE
    2621 echo "-------------" >> $LOGFILE
    2622 echo $DENY_MODS >> $LOGFILE
    2623 echo "-------------" >> $LOGFILE
    2624 echo "df result:" >> $LOGFILE
    2625 echo "----------" >> $LOGFILE
     2618LogFile "FORCE_MODS:"
     2619LogFile "-------------"
     2620LogFile $FORCE_MODS
     2621LogFile "-------------"
     2622LogFile "DENY_MODS:"
     2623LogFile "-------------"
     2624LogFile $DENY_MODS
     2625LogFile "-------------"
     2626LogFile "df result:"
     2627LogFile "----------"
    26262628df -T >> $LOGFILE
    2627 echo "-------------" >> $LOGFILE
    2628 echo "Liste of extra modules is:" >> $LOGFILE
    2629 echo "$EXTRA_MODS" >> $LOGFILE
    2630 echo "-------------" >> $LOGFILE
     2629LogFile "-------------"
     2630LogFile "Liste of extra modules is:"
     2631LogFile "$EXTRA_MODS"
     2632LogFile "-------------"
    26312633
    26322634# Compute libata version
     
    26362638    if [ "$laver" = "2" ]; then
    26372639        DENY_MODS="$DENY_MODS ide-generic"
    2638         echo "ide-generic removed from module list as your system uses libata v2+" >> $LOGFILE
    2639         echo "-------------" >> $LOGFILE
     2640        LogFile "ide-generic removed from module list as your system uses libata v2+"
     2641        LogFile "-------------"
    26402642    fi
    26412643fi
     
    27232725###
    27242726        kernelname=`echo $kernelpath | cut -d'-' -f2-`
    2725         LogIt "kernelname = $kernelname"
    2726         LogIt "kernelpath = $kernelpath"
     2727        LogAll "kernelname = $kernelname"
     2728        LogAll "kernelpath = $kernelpath"
    27272729        if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ]
    27282730        then
    2729            LogIt "Module path for ${kernelpath} not found..."
    2730            LogIt "using running kernel\'s modules."
     2731           LogAll "Module path for ${kernelpath} not found..."
     2732           LogAll "using running kernel\'s modules."
    27312733           kernelname=$KERVERRUN
    27322734        else
    2733            LogIt "Using modules for kernel: ${kernelname}"
     2735           LogAll "Using modules for kernel: ${kernelname}"
    27342736        fi
    27352737###
     
    27482750        if [ "${11}" ] ; then
    27492751            LILO_OPTIONS=""
    2750     #       LogIt "LILO will use conservative settings, to be compatible with older BIOSes."
     2752    #       LogAll "LILO will use conservative settings, to be compatible with older BIOSes."
    27512753        fi
    27522754        LAST_FILELIST_NUMBER=${12}
     
    27652767        [ "$USE_LZMA" = "" ] && USE_LZMA=no
    27662768        [ "$NOT_BOOT" = "" ] && NOT_BOOT=no
    2767         [ "$TAPEDEV" ] && LogIt "This is a tape-based backup. Fine."
     2769        [ "$TAPEDEV" ] && LogAll "This is a tape-based backup. Fine."
    27682770        [ "$kernelpath" = "" ] && kernelpath=`TryToFindKernelPath`
    27692771        kernelname=`echo $kernelpath | cut -d'-' -f2-`
    27702772        if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ]
    27712773        then
    2772            LogIt "Module path for ${kernelpath} not found..."
    2773            LogIt "using running kernel\'s modules."
     2774           LogAll "Module path for ${kernelpath} not found..."
     2775           LogAll "using running kernel\'s modules."
    27742776           kernelname=$KERVERRUN
    27752777        else
    2776            LogIt "Using modules for kernel: ${kernelname}"
     2778           LogAll "Using modules for kernel: ${kernelname}"
    27772779        fi
    27782780        # MONDO_ROOT is the real scratchdir
     
    27842786        fi
    27852787    else
    2786         echo "Syntax: mindi (--custom ....)" >> /dev/stderr
     2788        LogScreen "Syntax: mindi (--custom ....)"
    27872789        MindiExit -1
    27882790    fi
     
    27972799
    27982800if [ _"$MONDO_SHARE" = _"" ]; then
    2799     LogIt "Mindi Linux mini-distro generator v$MINDI_VERSION"
    2800     LogIt "Latest Mindi is available from http://www.mondorescue.org"
    2801     LogIt "BusyBox sources are available from http://www.busybox.net"
    2802     LogIt "------------------------------------------------------------------------------"
     2801    LogAll "Mindi Linux mini-distro generator v$MINDI_VERSION"
     2802    LogAll "Latest Mindi is available from http://www.mondorescue.org"
     2803    LogAll "BusyBox sources are available from http://www.busybox.net"
     2804    LogAll "------------------------------------------------------------------------------"
    28032805else
    2804     echo "You are using Mindi-Linux v$MINDI_VERSION to make boot+data disks" >> $LOGFILE
     2806    LogFile "You are using Mindi-Linux v$MINDI_VERSION to make boot+data disks"
    28052807fi
    28062808if [ -f $MINDI_LIB/rootfs/bin/busybox ]; then
    2807     LogIt "Mindi-`$MINDI_LIB/rootfs/bin/busybox 2>&1 | head -1`"
     2809    LogAll "Mindi-`$MINDI_LIB/rootfs/bin/busybox 2>&1 | head -1`"
    28082810else
    2809     LogIt "Unable to find mindi-busybox, please install it"
     2811    LogAll "Unable to find mindi-busybox, please install it"
    28102812    MindiExit -1
    28112813fi
     
    28192821KERN_DISK_MADE=""
    28202822
    2821 echo "DIFFERENTIAL = $DIFFERENTIAL" >> $LOGFILE
    2822 echo "INTERNAL TAPE BLOCK SIZE = $INTERNAL_TAPE_BLOCK_SIZE" >> $LOGFILE
    2823 echo "NOT_BOOT = '$NOT_BOOT'" >> $LOGFILE
     2823LogFile "DIFFERENTIAL = $DIFFERENTIAL"
     2824LogFile "INTERNAL TAPE BLOCK SIZE = $INTERNAL_TAPE_BLOCK_SIZE"
     2825LogFile "NOT_BOOT = '$NOT_BOOT'"
    28242826if [ "$NOT_BOOT" != "" ] && [ "$NOT_BOOT" != "0" ] && [ "$NOT_BOOT" != "no" ] ; then
    2825     LogIt "Just creating mondo-restore.cfg and a small all.tar.gz for Mondo. Nothing else."
     2827    LogAll "Just creating mondo-restore.cfg and a small all.tar.gz for Mondo. Nothing else."
    28262828    MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg
    28272829    MakeMountlist $MINDI_TMP/mountlist.txt
     
    28312833    tar -cv ./tmp | gzip -9 > $MINDI_TMP/all.tar.gz 2>> $MINDI_TMP/$$.log || Die "Cannot make small all.tar.gz" $MINDI_TMP/$$.log
    28322834    sleep 2
    2833     LogIt "Done. Exiting."
     2835    LogAll "Done. Exiting."
    28342836    MindiExit 0
    28352837fi
    28362838
    28372839if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ "$USBDEVICE" != "" ]; then
    2838     LogIt "Including the generation of a Bootable USB device on $USBDEVICE"
     2840    LogAll "Including the generation of a Bootable USB device on $USBDEVICE"
    28392841fi
    28402842
     
    28642866        source $MINDI_LIB/FindDistroFailsafe
    28652867        # Log kernel image
    2866         LogIt "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)"
     2868        LogAll "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)"
    28672869        kernelpath="$FAILSAFE_KBIN"
    2868         LogIt "I shall include a failsafe kernel, not your kernel, in the boot disks.\n"
    2869         LogIt "The failsafe kernel is $kernelpath.\n"
    2870         LogIt "However, you are still running your kernel. If Mindi fails to create your\n"
    2871         LogIt "disks then it may still be a result of a problem with your kernel.\n"
     2870        LogAll "I shall include a failsafe kernel, not your kernel, in the boot disks.\n"
     2871        LogAll "The failsafe kernel is $kernelpath.\n"
     2872        LogAll "However, you are still running your kernel. If Mindi fails to create your\n"
     2873        LogAll "disks then it may still be a result of a problem with your kernel.\n"
    28722874        pwd=`pwd`
    28732875        cd $MINDI_TMP
     
    28772879    else
    28782880        kernelpath=$MINDI_LIB/vmlinuz
    2879         LogIt "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks."
    2880         LogIt "However, you are still running your kernel. If Mindi fails to create your"
    2881         LogIt "disks then it may still be a result of a problem with your kernel."
     2881        LogAll "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks."
     2882        LogAll "However, you are still running your kernel. If Mindi fails to create your"
     2883        LogAll "disks then it may still be a result of a problem with your kernel."
    28822884        pwd=`pwd`
    28832885        cd $MINDI_TMP
     
    28872889    YOUR_KERNEL_SUCKS="Your kernel sucks"
    28882890fi
    2889 echo -e "Mindi's temp dir = $MINDI_TMP \nMindi's output dir=$MINDI_CACHE" >> $LOGFILE
    2890 [ "$(($RANDOM%64))" -eq "0" ] && LogIt "Dude, I've looked inside your computer and it's really dusty..."
     2891LogFile "Mindi's temp dir=$MINDI_TMP"
     2892LogFile "Mindi's output dir=$MINDI_CACHE"
     2893[ "$(($RANDOM%64))" -eq "0" ] && LogAll "Dude, I've looked inside your computer and it's really dusty..."
    28912894
    28922895[ "$YOUR_KERNEL_SUCKS" ] && [ ! "$FAILSAFE_KVER" ] && Die "Please install mindi-kernel package. You need it.\nGo to http://www.mondorescue.org and download it, then install it."
     
    28982901export ramdisk_size=$rds
    28992902
    2900 echo "Ramdisk will be $ramdisk_size KB" >> $LOGFILE
     2903LogFile "Ramdisk will be $ramdisk_size KB"
    29012904if [ "$ARCH" = "ia64" ] ; then
    29022905    PrepareBootDiskImage_LILO $kernelpath || Die "Failed to create ia64 image disk image."
     
    29142917        OfferToMakeBootableUSB
    29152918    fi
    2916     LogIt "Finished."
     2919    LogAll "Finished."
    29172920elif [ "$TAPEDEV" ] ; then
    29182921    if [ "$ARCH" != "ia64" ] ; then
     
    29372940fi
    29382941# cleanup
    2939 LogIt "$FRIENDLY_OUTSTRING"
     2942LogAll "$FRIENDLY_OUTSTRING"
    29402943for mtpt in $FLOPPY_WAS_MOUNTED ; do
    29412944    mount $mtpt
  • branches/2.2.10/mondo-doc/mondoarchive.8

    r2340 r2341  
    274274
    275275.TP
     276.BI "-Y "
     277Use lzma, the new quicker and optimized Linux compression engine, instead of bzip2.
     278
     279.TP
    276280.BI "-R "
    277281EXPERIMENTAL. Do not use in mission-critical environments. Star is an alternative to afio. Mondo now supports POSIX ACLs and extended attributes, so -R is essentially redundant for now.
  • branches/2.2.10/mondo/src/common/libmondo-archive.c

    r2338 r2341  
    545545    }
    546546
    547     mvaddstr_and_log_it(g_currentY, 0, "Calling MINDI to create boot+data disks");
    548547    mr_asprintf(tmp, "%s/filelist.full", bkpinfo->tmpdir);
    549548    if (!does_file_exist(tmp)) {
     
    84083911=\"%s\" 12=%s 13=%ld 14=\"%s\" 15=\"%s\" 16=\"%s\" 17=\"%s\" 18=%ld 19=%d",*/
    841840    mr_asprintf(command, "mindi %s --custom %s %s/images '%s' '%s' '%s' %ld '%s' '%s' '%s' \
    842 '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s' >> %s",
     841'%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s' '%s' >> %s",
    843842            tmp2,               // parameter #1
    844843            bkpinfo->tmpdir,    // parameter #2
     
    886885//  popup_and_OK("Pausing");
    887886
     887    mvaddstr_and_log_it(g_currentY, 0, "Calling MINDI to create boot+data disks");
    888888    res = run_external_binary_with_percentage_indicator_NEW("Generating boot+data disks", command);
    889889    paranoid_free(command);
  • branches/2.2.10/mondo/src/common/libmondo-files.c

    r2338 r2341  
    448448    }
    449449
    450     for (p--; isdigit(p) && p != lastline; p--);
     450    for (p--; isdigit(*p) && p != lastline; p--);
    451451    if (p != lastline) {
    452452        p++;
  • branches/2.2.10/mondo/src/lib/mr_mem.c

    r2322 r2341  
    118118 */
    119119void mr_strcat_int(char **in, int line, const char *file, const char *fmt, ...) {
    120     char *p = NULL;
    121120    char *fmt2 = NULL;
    122121    va_list args;
Note: See TracChangeset for help on using the changeset viewer.