Changeset 687 in MondoRescue for trunk/mindi/mindi


Ignore:
Timestamp:
Jul 17, 2006, 3:39:42 PM (18 years ago)
Author:
bcornec
Message:

merge -r671:686 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mindi/mindi

    r618 r687  
    206206
    207207AbortIfMkfsVfatMissing() {
    208     #if fgrep "vfat" /etc/fstab &> /dev/null ; then
     208    #if grep -F "vfat" /etc/fstab &> /dev/null ; then
    209209        if ! which mkfs.vfat &> /dev/null ; then
    210210            Die "mkfs.vfat missing from your filesystem - please install your dosfstools RPM or DEB package. Perhaps your PATH environmental variable is broken, too?"
     
    303303    mkdir -p $bigdir/etc
    304304    cp --parents -pRdf $mappath $bigdir || LogIt "AKMF -- Could not copy $mappath to $bigdir\n"
    305     if [ "`echo $mappath | fgrep ".gz"`" ] ; then
    306         included_list=`gzip -dc $mappath | fgrep -i include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`
    307     else
    308         included_list=`fgrep -i include $mappath | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`
     305    if [ "`echo $mappath | grep -F ".gz"`" ] ; then
     306        included_list=`gzip -dc $mappath | grep -Fi include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`
     307    else
     308        included_list=`grep -Fi include $mappath | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`
    309309    fi
    310310    for included_item in $included_list ; do
    311311    if [ ! -e "$included_item" ] ; then
    312             sss=`find $KEYDIR/keymaps | fgrep "${included_item}.inc"`
    313         [ "$sss" = "" ] && sss=`find $KEYDIR/keymaps | fgrep "$included_item"`
     312            sss=`find $KEYDIR/keymaps | grep -F "${included_item}.inc"`
     313        [ "$sss" = "" ] && sss=`find $KEYDIR/keymaps | grep -F "$included_item"`
    314314        for ii in $sss ; do
    315315                [ -e "$ii" ] && AddKeyboardMappingFile $ii
     
    340340    scratchfile=$TMP_ROOT/blah.$$.dat
    341341    cp -f $filename $scratchfile || Die "CUACF -- cannot copy $filename to $scratchfile - did you run out of disk space?"
    342     [ "`head $scratchfile -n1 | fgrep "bin/sh"`" != "" ] && StripComments $scratchfile "-$filename-"
    343     [ "`echo "$filename" | fgrep "etc/termcap"`" != "" ] && StripComments $scratchfile "-$filename-"
    344     if [ "`echo "$filename" | fgrep "lib/modules/" | grep "\.*o\.gz"`" != "" ] ; then
     342    [ "`head $scratchfile -n1 | grep -F "bin/sh"`" != "" ] && StripComments $scratchfile "-$filename-"
     343    [ "`echo "$filename" | grep -F "etc/termcap"`" != "" ] && StripComments $scratchfile "-$filename-"
     344    if [ "`echo "$filename" | grep -F "lib/modules/" | grep "\.*o\.gz"`" != "" ] ; then
    345345    mv $scratchfile $scratchfile.gz
    346346    gunzip -f $scratchfile || LogIt "Cannot gunzip $scratchfile.gz\n"
     
    523523
    524524    res=0
    525     [ "`ps ax | fgrep "mondoarchive" | grep -v "grep"`" ] && res=$(($res+1))
     525    [ "`ps ax | grep -F "mondoarchive" | grep -v "grep"`" ] && res=$(($res+1))
    526526    [ -f "/var/run/monitas-mondo.pid" ] && res=$(($res+1))
    527527    [ "$res" -gt "1" ] && echo "yes"
     
    542542    cd /
    543543
    544     my_partitions=`mount | fgrep $$ | cut -f1 -d' '`
     544    my_partitions=`mount | grep -F $$ | cut -f1 -d' '`
    545545    [ "$my_partitions" != "" ] && umount $my_partitions
    546546    # BCO : Too Dangerous !!!
     
    589589    ln -sf $vanilla_lib_name $outdir$optimized_lib_name
    590590    echo "Excluding $optimized_lib_name" >> $LOGFILE
    591     fgrep -vx "$optimized_lib_name $filelist" > $filelist.tmp
     591    grep -Fvx "$optimized_lib_name $filelist" > $filelist.tmp
    592592    echo "Replacing it with $vanilla_lib_name" >> $LOGFILE
    593593    echo "$vanilla_lib_name" >> $filelist.tmp
     
    647647    fi
    648648    echo "keyfile=$keyfile" >> $LOGFILE
    649     locale=`fgrep KEYTABLE "$keyfile" | tr -d '"' |cut -d'=' -f2`
     649    locale=`grep -F KEYTABLE "$keyfile" | tr -d '"' |cut -d'=' -f2`
    650650    [ ! "$locale" ] && locale=`grep '.map$' "$keyfile" | sed 's/^.* //'`        # Slackware
    651651    echo "locale=$locale" >> $LOGFILE
    652     mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | fgrep "${locale}." | grep -vx " *#.*"`
     652    mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep -F "${locale}." | grep -vx " *#.*"`
    653653    [ ! "$mp" ] && mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep "$locale[^r][^/]" | grep -vx " *#.*"`
    654654    for i in $mp ; do
     
    711711        LILO_EXE=lilo
    712712    fi
    713     $LILO_EXE -V | fgrep "21.6" > /dev/null && Die "Please upgrade LILO. Your verison has a serious bug. If you're not _using_ LILO, fine, uninstall it. :)"
     713    $LILO_EXE -V | grep -F "21.6" > /dev/null && Die "Please upgrade LILO. Your verison has a serious bug. If you're not _using_ LILO, fine, uninstall it. :)"
    714714    else
    715715    LILO_EXE=`which false`
     
    832832        for tool in $filelist ; do
    833833            lvmresolved=`ResolveSoftlink $tool`
    834             if echo "$lvmresolved" | grep "lvmiopversion" &> /dev/null ; then
     834            if [ "$tool" == "$lvmresolved" ]; then
     835            echo "$tool" >> $tempfile
     836            elif echo "$lvmresolved" | grep "lvmiopversion" &> /dev/null ; then
    835837            if [ "$lvmversion" = "" ] ; then
    836838            lvmversion=`$lvmresolved`
     
    838840            fi
    839841            toolstripped=`echo $tool | $AWK -F / '{print $NF;}'`
     842            if [ "$lvmversion" == "200" ]; then
     843            # pvdata and lvmcreate_initrd don't exist in LVM2
     844            case "$toolstripped" in
     845                "pvdata")
     846                continue
     847                ;;
     848                "lvmcreate_initrd")
     849                continue
     850                ;;
     851            esac
     852            fi
    840853            toolpath="/sbin/lvm-"$lvmversion"/"$toolstripped
    841854            if [ -e "$toolpath" ] ; then
     
    923936    fi
    924937    fi
    925      tr ' ' '\n' < $outfile.pre | tr -s '/' '/' | fgrep -vx "" | sort -u | egrep -v "/libX11|/libXext|/libXi|/libgtk|/libgdk" > $outfile
     938     tr ' ' '\n' < $outfile.pre | tr -s '/' '/' | grep -Fvx "" | sort -u | grep -Ev "/libX11|/libXext|/libXi|/libgtk|/libgdk" > $outfile
    926939    rm -f $tempfile $outfile.pre
    927940    [ "$res" -eq "0" ] && echo -e "\r\t\t\t\t\t\t\t\t$DONE" || echo "\nFailed."
     
    10201033    > $outfile
    10211034    partlist=$(mount | cut -d' ' -f1,3,5 \
    1022     | egrep -v "((none|/tmp|/ISOs|/proc|/dev/root) )|/mnt/" \
     1035    | grep -Ev "((none|/tmp|/ISOs|/proc|/dev/root) )|/mnt/" \
    10231036    | tr ' ' '|')
    10241037
     
    10741087    path=$1
    10751088    echo -en "In the directory '$path' you will find the images:-\n"
    1076     for fname in `ls $path | fgrep mindi-` ; do
     1089    for fname in `ls $path | grep -F mindi-` ; do
    10771090        printf "%19s " $fname
    10781091    done
     
    11031116        echo "module $module --> $r" >> $LOGFILE
    11041117        [ "$r" ] && echo "$r"
    1105         [ -f "$oss" ] && find $oss | fgrep $module
     1118        [ -f "$oss" ] && find $oss | grep -F $module
    11061119    done
    11071120    find /lib/modules/$kern/modules.* -type f 2> /dev/null
     
    11771190    location=`echo "$path/$fname_to_find" | tr -s '/' '/'`
    11781191    if echo "$location" | grep "lib/lib" 2> /dev/null ; then
    1179         loclist=`find $path -maxdepth 1 | fgrep "$fname_to_find"`
     1192        loclist=`find $path -maxdepth 1 | grep -F "$fname_to_find"`
    11801193    else
    11811194        loclist=$location
     
    11911204            done
    11921205#       resolved=`file $location | $AWK '{print $NF;}'`
    1193 #       if [ "`echo "$resolved" | fgrep "/"`" = "" ] ; then
     1206#       if [ "`echo "$resolved" | grep -F "/"`" = "" ] ; then
    11941207#           stub=`dirname $location`
    11951208#           output="/$stub/$resolved $output"
     
    13431356partition_size partition_format outstring partition_number \
    13441357partition_mountpt c_p lwm_info psz lvm_dev unofficial_outstring \
    1345 absolute_partition old_partition_fmt
     1358absolute_partition old_partition_fmt current_lvolume
    13461359
    13471360    echo "Your raw fstab file looks like this:-" >> $LOGFILE
     
    13671380    if [ -d "/proc/lvm" ] || [ -d "/dev/mapper" ]; then
    13681381        echo -en "\rAnalyzing LVM...\r"
    1369         all_partitions=`$MINDI_LIB/analyze-my-lvm | fgrep ">>>" | cut -d' ' -f2-32`
     1382        all_partitions=`$MINDI_LIB/analyze-my-lvm | grep -F ">>>" | cut -d' ' -f2-32`
    13701383    fi
    13711384    all_partitions="$all_partitions `ListAllPartitions 2> /dev/null`"
    13721385#    echo "all partitions = $all_partitions" > /dev/stderr
    13731386    for i in $IMAGE_DEVS ; do
    1374         mount | fgrep "$i " > /dev/null 2> /dev/null && Die "Sorry, $i is already mounted! CANNOT DO IMAGEDEV on it if it's mounted."
     1387        mount | grep -F "$i " > /dev/null 2> /dev/null && Die "Sorry, $i is already mounted! CANNOT DO IMAGEDEV on it if it's mounted."
    13751388    done
    13761389    [ "$IMAGE_DEVS" != "" ] && all_partitions="`echo "$all_partitions $IMAGE_DEVS" | tr ' ' '\n' | sort -u | tr '\n ' ' '`"
     
    13781391    for c_p in $all_partitions ; do
    13791392#        echo "c_p = $c_p" > /dev/stderr
    1380         [ "`echo "/dev/floppy /dev/fd0h1440 /dev/fd0H1440 /dev/cdrom /dev/cdrom/cdrom /dev/cdrom/cdrom1 /dev/cdrom/cdrom2 /dev/cdrom0 /dev/cdrom1 /dev/cdrom2 /dev/cdrom3 /dev/cdrw" | fgrep "$c_p"`" != "" ] || [ "`echo "$c_p" | fgrep "/dev/scd"`" != "" ] || [ "`echo "$c_p" | fgrep "/dev/ram"`" != "" ] || [ "`echo "$c_p" | grep ":"`" != "" ] || [ "`echo "$c_p" | fgrep ":/"`" != "" ] && continue
    1381         [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | fgrep "$c_p"`" ] && continue
     1393        [ "`echo "/dev/floppy /dev/fd0h1440 /dev/fd0H1440 /dev/cdrom /dev/cdrom/cdrom /dev/cdrom/cdrom1 /dev/cdrom/cdrom2 /dev/cdrom0 /dev/cdrom1 /dev/cdrom2 /dev/cdrom3 /dev/cdrw" | grep -F "$c_p"`" != "" ] || [ "`echo "$c_p" | grep -F "/dev/scd"`" != "" ] || [ "`echo "$c_p" | grep -F "/dev/ram"`" != "" ] || [ "`echo "$c_p" | grep ":"`" != "" ] || [ "`echo "$c_p" | grep -F ":/"`" != "" ] && continue
     1394        [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | grep -F "$c_p"`" ] && continue
    13821395        [ "`echo "$c_p" | grep -x "/dev/cdroms.*"`" ] && continue
    1383         if [ -h "$c_p" ] && [ "`echo "$c_p" | fgrep "/dev/hd"`" = "" ] && [ "`echo "$c_p" | fgrep "/dev/sd"`" = "" ] && [ "`echo "$c_p" | fgrep "/dev/md"`" = "" ] ; then
     1396        if [ -h "$c_p" ] && [ "`echo "$c_p" | grep -F "/dev/hd"`" = "" ] && [ "`echo "$c_p" | grep -F "/dev/sd"`" = "" ] && [ "`echo "$c_p" | grep -F "/dev/md"`" = "" ] ; then
    13841397            current_partition=`ResolveSoftlink $c_p`
    1385             [ "`echo "$current_partition" | fgrep "/dev/mapper"`" != "" ] && current_partition="$c_p"
    1386             [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | fgrep "$current_partition"`" ] && continue
     1398            [ "`echo "$current_partition" | grep -F "/dev/mapper"`" != "" ] && current_partition="$c_p"
     1399            [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | grep -F "$current_partition"`" ] && continue
    13871400        else
    13881401            current_partition="$c_p"
     
    14411454
    14421455    partition_format=`$AWK '$1 == "'"$str_to_find_fmt_with"'" {print $3}' $MY_FSTAB`
    1443     if [ -d "/proc/lvm" ] && [ "`lvdisplay $current_partition 2> /dev/null`" ]; then
     1456    # Some distributions such as Debian do not put /dev/<VG>/<LV> in fstab
     1457    # for LVM partitions but use /dev/mapper/<VG>-<LV> instead. Fortunately,
     1458    # the former is then a link to the latter, so we test whether
     1459    # $current_partition is actually such a link or not and set
     1460    # $current_lvolume accordingly. Note that $current_lvolume may well be an
     1461    # ordinary device. It is just to make sure that we feed the right value
     1462    # into any of the LVM tools if possible.
     1463    if [ -d "/dev/mapper" ] && [ -z "`lvm lvdisplay $current_partition 2> /dev/null`" ]; then
     1464        partition_stub="`echo "$current_partition" | sed "s|^/dev/mapper/|/dev/|" | cut -d"-" -f1`"
     1465        current_lvolume="`find /dev -lname "$current_partition" | grep "^$partition_stub"`"
     1466    fi
     1467    if [ -z "$current_lvolume" ]; then
     1468        current_lvolume="$current_partition"
     1469    fi
     1470    # End of LVM device style variation code (other than $current_lvolume).
     1471    if [ -d "/proc/lvm" ] && [ "`lvdisplay $current_lvolume 2> /dev/null`" ]; then
    14441472        partition_size="lvm"
    1445     elif [ -d "/dev/mapper" ] && [ "`lvm lvdisplay $current_partition 2> /dev/null`" ]; then
     1473    elif [ -d "/dev/mapper" ] && [ "`lvm lvdisplay $current_lvolume 2> /dev/null`" ]; then
    14461474        partition_size="lvm"
    14471475    else
     
    14501478        [ "`echo "$current_partition" | grep -c "^/"`" -ne "1" ] && continue
    14511479        if [ "$partition_format" = "swap" ] || [ "$partition_mountpt" = "swap" ] ; then
    1452         partition_size=`fgrep -v "Priority" /proc/swaps | tr -s '\t' ' ' | fgrep "$current_partition" | $AWK '{print $3}'`
     1480        partition_size=`grep -Fv "Priority" /proc/swaps | tr -s '\t' ' ' | grep -F "$current_partition" | $AWK '{print $3}'`
    14531481        [ "$partition_mountpt" != "swap" ] && partition_mountpt="swap"
    14541482                [ "$partition_format" != "swap" ] && partition_format="swap"
     
    14561484            totalsize=0
    14571485            items=0
    1458             for i in `tr -s ' ' '\t' < /proc/swaps | fgrep -v "Filename" | cut -f3` ; do
     1486            for i in `tr -s ' ' '\t' < /proc/swaps | grep -Fv "Filename" | cut -f3` ; do
    14591487            totalsize=$(($totalsize+$i))
    14601488            items=$(($items+1))
     
    14691497    [ "$partition_format" = "swap" ] && partition_mountpt="swap"
    14701498    if [ "$partition_mountpt" = "" ] ; then
    1471         if [ "`pvdisplay $current_partition 2> /dev/null`" != "" ] || [ "`lvm pvdisplay $current_partition 2> /dev/null`" != "" ] ; then
    1472         if  [ "`fgrep device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then
     1499        if [ "`pvdisplay $current_lvolume 2> /dev/null`" != "" ] || [ "`lvm pvdisplay $current_lvolume 2> /dev/null`" != "" ] ; then
     1500        if  [ "`grep -F device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then
    14731501            partition_mountpt="raid"
    14741502            partition_format="raid"
    14751503        else
    1476 #           lvm_dev="`pvdisplay $current_partition | grep -i "VG N" | head -n1 | tr -s ' ' ' ' | cut -d' ' -f3`"
     1504#           lvm_dev="`pvdisplay $current_lvolume | grep -i "VG N" | head -n1 | tr -s ' ' ' ' | cut -d' ' -f3`"
    14771505            partition_mountpt="lvm"
    14781506            partition_format="lvm"
     
    14831511    echo "Examining $current_partition (mount=$partition_mountpt fmt=$partition_format psz=$psz)" >> $LOGFILE
    14841512    [ "$psz" != "lvm" ] && psz=$(($psz/1024))
    1485     if [ "`echo " $IMAGE_DEVS " | fgrep " $current_partition "`" != "" ] ; then
     1513    if [ "`echo " $IMAGE_DEVS " | grep -F " $current_partition "`" != "" ] ; then
    14861514        partition_mountpt="image"
    14871515            old_partition_fmt=$partition_format
     
    14981526            fi
    14991527    fi
    1500         if [ "$EXCLUDE_DEVS" ] && [ "`echo " $EXCLUDE_DEVS " | fgrep " $current_partition "`" ] || [ "`echo " $EXCLUDE_DEVS " | grep " $current_partition "`" ] ; then
     1528        if [ "$EXCLUDE_DEVS" ] && [ "`echo " $EXCLUDE_DEVS " | grep -F " $current_partition "`" ] || [ "`echo " $EXCLUDE_DEVS " | grep " $current_partition "`" ] ; then
    15011529            echo "Excluding $current_partition from mountlist" >> $LOGFILE
    15021530            continue
     
    15121540        if [ "$partition_format" = "Compaq diagnostics" ] ; then
    15131541        partition_format="compaq"
    1514         elif [ ! "`fgrep device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then
     1542        elif [ ! "`grep -F device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then
    15151543        LogIt "Unable to find mountpoint of $current_partition - ignoring\n"
    15161544        continue
     
    15231551        echo "Unknown partition (outstring = $unofficial_outstring)" >> $LOGFILE
    15241552    elif [ "$partition_mountpt" = "" ] && [ -f "/etc/raidtab" ] ; then
    1525         if [ "`fgrep device /etc/raidtab 2>/dev/null | fgrep $current_partition`" ] ; then
     1553        if [ "`grep -F device /etc/raidtab 2>/dev/null | grep -F $current_partition`" ] ; then
    15261554        partition_mountpt=raid
    15271555        partition_format=raid
     
    15691597    rmdir $1
    15701598    echo -en "  " > $1
    1571     if [ "`fgrep -i "debian" /etc/issue.net 2> /dev/null`" ] ; then
     1599    if [ "`grep -Fi "debian" /etc/issue.net 2> /dev/null`" ] ; then
    15721600        sed s/ZZZZZ/$MINDI_VERSION/ $MINDI_LIB/msg-txt | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s%DDDDD%"Debian GNU\/`uname -s` `cut -d ' ' -f 3 /etc/issue.net` `hostname`"% | sed s/KKKKK/"Kernel `uname  -r` on a `uname -m`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ >> $1.tmp
    15731601    else
     
    16231651    return 1
    16241652}
    1625 
    1626 
    1627 
    16281653
    16291654
     
    17091734    local disksize
    17101735    disksize=$1
    1711     if [ "`fgrep -i "debian" /etc/issue.net 2> /dev/null`" ] ; then
     1736    if [ "`grep -Fi "debian" /etc/issue.net 2> /dev/null`" ] ; then
    17121737        sed s/ZZZZZ/$MINDI_VERSION/ $MINDI_LIB/msg-txt | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s%DDDDD%"Debian GNU\/`uname -s` `cut -d ' ' -f 3 /etc/issue.net` `hostname`"% | sed s/KKKKK/"Kernel `uname  -r` on a `uname -m`"/ | sed s/TTTTT/"`LC_TIME=C date`"/
    17131738    else
     
    20002025    fi
    20012026    if [ $? -ne "0" ] ; then
    2002     if [ "`fgrep "/tmp/dev.0" $LOGFILE`" ] ; then
     2027    if [ "`grep -F "/tmp/dev.0" $LOGFILE`" ] ; then
    20032028        LogIt "The '/tmp/dev.0' error is NOT Mindi's fault. It is LILO's.\n"
    20042029        LogIt "Please reboot your PC as a workaround.\n"
     
    24542479    local devpath drive res stub
    24552480    device=$1
    2456     if [ "`echo "$device" | fgrep "/dev/md"`" != "" ] ; then
     2481    if [ "`echo "$device" | grep -F "/dev/md"`" != "" ] ; then
    24572482    res=`SizeOfRaidPartition $device`
    24582483    [ "$res" = "" ] && Die "Cannot find $device's size - is your /etc/raidtab sane?"
     
    24672492    echo "------- $FDISK log end ------------" >> $LOGFILE
    24682493# end patch
    2469     [ "$res" = "" ] && res=`df -k -P -x supermount | tr -s '\t' ' ' | fgrep "$device " | cut -d' ' -f2`
     2494    [ "$res" = "" ] && res=`df -k -P -x supermount | tr -s '\t' ' ' | grep -F "$device " | cut -d' ' -f2`
    24702495    [ "$res" = "" ] && res="-1"
    24712496    echo $res
     
    25792604       root="/"
    25802605    fi
    2581     for fname in `find $root -maxdepth 2 -type f | fgrep lin | egrep -v '^/proc/|^/net/'` ; do
     2606    for fname in `find $root -maxdepth 2 -type f | grep -F lin | grep -Ev '^/proc/|^/net/'` ; do
    25822607    [ ! -e "$fname" ] && continue
    25832608        [ "$fname" = "/boot/vmlinuz.shipped" ] && [ -f "/boot/vmlinuz" ] && continue; # ignore SuSE's extra kernel
     
    25912616        [ "$fkern_ver" = "" ] && continue
    25922617#   echo "$fname --> $fkern_ver (but we want $we_want_version)" >> /dev/stderr
    2593         [ "`echo "$fkern_ver" |fgrep "$we_want_version "`" = "" ] && continue
     2618        [ "`echo "$fkern_ver" |grep -F "$we_want_version "`" = "" ] && continue
    25942619    [ -f "$fname" ] || continue
    25952620    [ -h "$fname" ] && continue
     
    25982623    if [ "$?" -eq "0" ] ; then
    25992624        # Used by ia64
    2600         if [ "`gzip -cd $fname | strings 2> /dev/null | fgrep "$kdate"`" = "" ] ; then
     2625        if [ "`gzip -cd $fname | strings 2> /dev/null | grep -F "$kdate"`" = "" ] ; then
    26012626            LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting? Naughty but I'll allow it...\n"
    26022627            duff_kernels="$fname $duff_kernels"
    26032628        else
    2604                 [ "`echo "$fname" | fgrep "vmlinux"`" ] && continue
     2629                [ "`echo "$fname" | grep -F "vmlinux"`" ] && continue
    26052630                possible_kernels="$fname $possible_kernels"
    26062631        fi
    26072632    else
    2608         if [ "`strings $fname 2> /dev/null | fgrep "$kdate"`" = "" ] ; then
     2633        if [ "`strings $fname 2> /dev/null | grep -F "$kdate"`" = "" ] ; then
    26092634            LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting?\n Naughty but I'll allow it...\n"
    26102635            duff_kernels="$fname $duff_kernels"
    26112636        else
    2612                 [ "`echo "$fname" | fgrep "vmlinux"`" ] && continue
     2637                [ "`echo "$fname" | grep -F "vmlinux"`" ] && continue
    26132638                possible_kernels="$fname $possible_kernels"
    26142639        fi
     
    26512676        fi
    26522677        done
    2653     if echo " $possible_kernels " | fgrep "/boot/vmlinuz " &> /dev/null ; then
     2678    if echo " $possible_kernels " | grep -F "/boot/vmlinuz " &> /dev/null ; then
    26542679        output=/boot/vmlinuz
    26552680        echo "Schlomo, this one's for you." >> $LOGFILE
     
    26802705    old_pwd=`pwd`
    26812706    cd $bigdir
    2682     list_of_files=`GetFileSizeList . | sort -nr | cut -f2 | fgrep -v "/dev/"`
     2707    list_of_files=`GetFileSizeList . | sort -nr | cut -f2 | grep -Fv "/dev/"`
    26832708    progress=0
    26842709    total_files=`CountItemsIn "$list_of_files"`
     
    28272852        echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE
    28282853        cp -df $i $mountpoint/ || LogIt "Unable to copy $i to $mountpoint\n"
    2829         [ "`echo "$i" | fgrep ".gz"`" ] && gunzip -f $mountpoint/`basename $i`
     2854        [ "`echo "$i" | grep -F ".gz"`" ] && gunzip -f $mountpoint/`basename $i`
    28302855    done
    28312856#    if [ -e "/dev/.devfsd" ] ; then
     
    28772902WhichOfTheseModulesAreLoaded() {
    28782903    local modname loaded_modules
    2879     loaded_modules=" `lsmod | tr -s ' ' '\t' | cut -f1 | fgrep -vx "Modules" | tr '\n' ' '` "
     2904    loaded_modules=" `lsmod | tr -s ' ' '\t' | cut -f1 | grep -Fvx "Modules" | tr '\n' ' '` "
    28802905    for modname in $1 ; do
    2881     [ "`echo "$loaded_modules" | fgrep " $modname "`" ] && echo "$modname"
     2906    [ "`echo "$loaded_modules" | grep -F " $modname "`" ] && echo "$modname"
    28822907    done
    28832908}
     
    29913016fi
    29923017FixPathIfBroken
    2993 [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | egrep "2\.[46]" | cut -d' ' -f1`
     3018[ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1`
    29943019AbortIfMkfsVfatMissing
    29953020### BCO
     
    30013026    FindLiloBinary
    30023027fi
    3003 fgrep " $TMP_ROOT " /proc/mounts | fgrep tmpfs > /dev/null 2> /dev/null && TMP_ROOT=/home && LogIt "Changing TMP_ROOT to $TMP_ROOT because you're using tmpfs for /tmp\n" ; # tmpfs doesn't like Mindi and /tmp, for some reason
     3028grep -F " $TMP_ROOT " /proc/mounts | grep -F tmpfs > /dev/null 2> /dev/null && TMP_ROOT=/home && LogIt "Changing TMP_ROOT to $TMP_ROOT because you're using tmpfs for /tmp\n" ; # tmpfs doesn't like Mindi and /tmp, for some reason
    30043029rm -f /tmp/mindi_lo
    30053030trap "Aborted" SIGTERM
Note: See TracChangeset for help on using the changeset viewer.