Changeset 682 in MondoRescue


Ignore:
Timestamp:
Jun 25, 2006, 4:53:47 AM (18 years ago)
Author:
andree
Message:

Replaced all occurrences of egrep with 'grep -E' and of fgrep with
'grep -F' in mindi.
egrep and fgrep are usually just script wrappers around grep these
days which means additional overhead compared to calling grep with the
relevant option. Also, it appears that egrep and fgrep have been
deprecated by POSIX some time ago.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/mindi

    r675 r682  
    152152
    153153AbortIfMkfsVfatMissing() {
    154     #if fgrep "vfat" /etc/fstab &> /dev/null ; then
     154    #if grep -F "vfat" /etc/fstab &> /dev/null ; then
    155155        if ! which mkfs.vfat &> /dev/null ; then
    156156            Die "mkfs.vfat missing from your filesystem - please install your dosfstools RPM or DEB package. Perhaps your PATH environmental variable is broken, too?"
     
    249249    mkdir -p $bigdir/etc
    250250    cp --parents -pRdf $mappath $bigdir || LogIt "AKMF -- Could not copy $mappath to $bigdir\n"
    251     if [ "`echo $mappath | fgrep ".gz"`" ] ; then
    252         included_list=`gzip -dc $mappath | fgrep -i include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`
    253     else
    254         included_list=`fgrep -i include $mappath | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`
     251    if [ "`echo $mappath | grep -F ".gz"`" ] ; then
     252        included_list=`gzip -dc $mappath | grep -Fi include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`
     253    else
     254        included_list=`grep -Fi include $mappath | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`
    255255    fi
    256256    for included_item in $included_list ; do
    257257    if [ ! -e "$included_item" ] ; then
    258             sss=`find $KEYDIR/keymaps | fgrep "${included_item}.inc"`
    259         [ "$sss" = "" ] && sss=`find $KEYDIR/keymaps | fgrep "$included_item"`
     258            sss=`find $KEYDIR/keymaps | grep -F "${included_item}.inc"`
     259        [ "$sss" = "" ] && sss=`find $KEYDIR/keymaps | grep -F "$included_item"`
    260260        for ii in $sss ; do
    261261                [ -e "$ii" ] && AddKeyboardMappingFile $ii
     
    286286    scratchfile=$TMP_ROOT/blah.$$.dat
    287287    cp -f $filename $scratchfile || Die "CUACF -- cannot copy $filename to $scratchfile - did you run out of disk space?"
    288     [ "`head $scratchfile -n1 | fgrep "bin/sh"`" != "" ] && StripComments $scratchfile "-$filename-"
    289     [ "`echo "$filename" | fgrep "etc/termcap"`" != "" ] && StripComments $scratchfile "-$filename-"
    290     if [ "`echo "$filename" | fgrep "lib/modules/" | grep "\.*o\.gz"`" != "" ] ; then
     288    [ "`head $scratchfile -n1 | grep -F "bin/sh"`" != "" ] && StripComments $scratchfile "-$filename-"
     289    [ "`echo "$filename" | grep -F "etc/termcap"`" != "" ] && StripComments $scratchfile "-$filename-"
     290    if [ "`echo "$filename" | grep -F "lib/modules/" | grep "\.*o\.gz"`" != "" ] ; then
    291291    mv $scratchfile $scratchfile.gz
    292292    gunzip -f $scratchfile || LogIt "Cannot gunzip $scratchfile.gz\n"
     
    469469
    470470    res=0
    471     [ "`ps ax | fgrep "mondoarchive" | grep -v "grep"`" ] && res=$(($res+1))
     471    [ "`ps ax | grep -F "mondoarchive" | grep -v "grep"`" ] && res=$(($res+1))
    472472    [ -f "/var/run/monitas-mondo.pid" ] && res=$(($res+1))
    473473    [ "$res" -gt "1" ] && echo "yes"
     
    488488    cd /
    489489
    490     my_partitions=`mount | fgrep $$ | cut -f1 -d' '`
     490    my_partitions=`mount | grep -F $$ | cut -f1 -d' '`
    491491    [ "$my_partitions" != "" ] && umount $my_partitions
    492492    [ "$TMP_ROOT" != "/tmp" ] && rm -Rf $TMP_ROOT
     
    534534    ln -sf $vanilla_lib_name $outdir$optimized_lib_name
    535535    echo "Excluding $optimized_lib_name" >> $LOGFILE
    536     fgrep -vx "$optimized_lib_name $filelist" > $filelist.tmp
     536    grep -Fvx "$optimized_lib_name $filelist" > $filelist.tmp
    537537    echo "Replacing it with $vanilla_lib_name" >> $LOGFILE
    538538    echo "$vanilla_lib_name" >> $filelist.tmp
     
    592592    fi
    593593    echo "keyfile=$keyfile" >> $LOGFILE
    594     locale=`fgrep KEYTABLE "$keyfile" | tr -d '"' |cut -d'=' -f2`
     594    locale=`grep -F KEYTABLE "$keyfile" | tr -d '"' |cut -d'=' -f2`
    595595    [ ! "$locale" ] && locale=`grep '.map$' "$keyfile" | sed 's/^.* //'`        # Slackware
    596596    echo "locale=$locale" >> $LOGFILE
    597     mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | fgrep "${locale}." | grep -vx " *#.*"`
     597    mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep -F "${locale}." | grep -vx " *#.*"`
    598598    [ ! "$mp" ] && mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep "$locale[^r][^/]" | grep -vx " *#.*"`
    599599    for i in $mp ; do
     
    656656        LILO_EXE=lilo
    657657    fi
    658     $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. :)"
     658    $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. :)"
    659659    else
    660660    LILO_EXE=`which false`
     
    884884    fi
    885885    fi
    886      tr ' ' '\n' < $outfile.pre | tr -s '/' '/' | fgrep -vx "" | sort -u | egrep -v "/libX11|/libXext|/libXi|/libgtk|/libgdk" > $outfile
     886     tr ' ' '\n' < $outfile.pre | tr -s '/' '/' | grep -Fvx "" | sort -u | grep -Ev "/libX11|/libXext|/libXi|/libgtk|/libgdk" > $outfile
    887887    rm -f $tempfile $outfile.pre
    888888    [ "$res" -eq "0" ] && echo -e "\r\t\t\t\t\t\t\t\t$DONE" || echo "\nFailed."
     
    981981    > $outfile
    982982    partlist=$(mount | cut -d' ' -f1,3,5 \
    983     | egrep -v "((none|/tmp|/ISOs|/proc|/dev/root) )|/mnt/" \
     983    | grep -Ev "((none|/tmp|/ISOs|/proc|/dev/root) )|/mnt/" \
    984984    | tr ' ' '|')
    985985
     
    10351035    path=$1
    10361036    echo -en "In the directory '$path' you will find the images:-\n"
    1037     for fname in `ls $path | fgrep mindi-` ; do
     1037    for fname in `ls $path | grep -F mindi-` ; do
    10381038        printf "%19s " $fname
    10391039    done
     
    10641064        echo "module $module --> $r" >> $LOGFILE
    10651065        [ "$r" ] && echo "$r"
    1066         [ -f "$oss" ] && find $oss | fgrep $module
     1066        [ -f "$oss" ] && find $oss | grep -F $module
    10671067    done
    10681068    find /lib/modules/$kern/modules.* -type f 2> /dev/null
     
    11381138    location=`echo "$path/$fname_to_find" | tr -s '/' '/'`
    11391139    if echo "$location" | grep "lib/lib" 2> /dev/null ; then
    1140         loclist=`find $path -maxdepth 1 | fgrep "$fname_to_find"`
     1140        loclist=`find $path -maxdepth 1 | grep -F "$fname_to_find"`
    11411141    else
    11421142        loclist=$location
     
    11521152            done
    11531153#       resolved=`file $location | $AWK '{print $NF;}'`
    1154 #       if [ "`echo "$resolved" | fgrep "/"`" = "" ] ; then
     1154#       if [ "`echo "$resolved" | grep -F "/"`" = "" ] ; then
    11551155#           stub=`dirname $location`
    11561156#           output="/$stub/$resolved $output"
     
    13281328    if [ -d "/proc/lvm" ] || [ -d "/dev/mapper" ]; then
    13291329        echo -en "\rAnalyzing LVM...\r"
    1330         all_partitions=`$MINDI_LIB/analyze-my-lvm | fgrep ">>>" | cut -d' ' -f2-32`
     1330        all_partitions=`$MINDI_LIB/analyze-my-lvm | grep -F ">>>" | cut -d' ' -f2-32`
    13311331    fi
    13321332    all_partitions="$all_partitions `ListAllPartitions 2> /dev/null`"
    13331333#    echo "all partitions = $all_partitions" > /dev/stderr
    13341334    for i in $IMAGE_DEVS ; do
    1335         mount | fgrep "$i " > /dev/null 2> /dev/null && Die "Sorry, $i is already mounted! CANNOT DO IMAGEDEV on it if it's mounted."
     1335        mount | grep -F "$i " > /dev/null 2> /dev/null && Die "Sorry, $i is already mounted! CANNOT DO IMAGEDEV on it if it's mounted."
    13361336    done
    13371337    [ "$IMAGE_DEVS" != "" ] && all_partitions="`echo "$all_partitions $IMAGE_DEVS" | tr ' ' '\n' | sort -u | tr '\n ' ' '`"
     
    13391339    for c_p in $all_partitions ; do
    13401340#        echo "c_p = $c_p" > /dev/stderr
    1341         [ "`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
    1342         [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | fgrep "$c_p"`" ] && continue
     1341        [ "`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
     1342        [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | grep -F "$c_p"`" ] && continue
    13431343        [ "`echo "$c_p" | grep -x "/dev/cdroms.*"`" ] && continue
    1344         if [ -h "$c_p" ] && [ "`echo "$c_p" | fgrep "/dev/hd"`" = "" ] && [ "`echo "$c_p" | fgrep "/dev/sd"`" = "" ] && [ "`echo "$c_p" | fgrep "/dev/md"`" = "" ] ; then
     1344        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
    13451345            current_partition=`ResolveSoftlink $c_p`
    1346             [ "`echo "$current_partition" | fgrep "/dev/mapper"`" != "" ] && current_partition="$c_p"
    1347             [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | fgrep "$current_partition"`" ] && continue
     1346            [ "`echo "$current_partition" | grep -F "/dev/mapper"`" != "" ] && current_partition="$c_p"
     1347            [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | grep -F "$current_partition"`" ] && continue
    13481348        else
    13491349            current_partition="$c_p"
     
    14261426        [ "`echo "$current_partition" | grep -c "^/"`" -ne "1" ] && continue
    14271427        if [ "$partition_format" = "swap" ] || [ "$partition_mountpt" = "swap" ] ; then
    1428         partition_size=`fgrep -v "Priority" /proc/swaps | tr -s '\t' ' ' | fgrep "$current_partition" | $AWK '{print $3}'`
     1428        partition_size=`grep -Fv "Priority" /proc/swaps | tr -s '\t' ' ' | grep -F "$current_partition" | $AWK '{print $3}'`
    14291429        [ "$partition_mountpt" != "swap" ] && partition_mountpt="swap"
    14301430                [ "$partition_format" != "swap" ] && partition_format="swap"
     
    14321432            totalsize=0
    14331433            items=0
    1434             for i in `tr -s ' ' '\t' < /proc/swaps | fgrep -v "Filename" | cut -f3` ; do
     1434            for i in `tr -s ' ' '\t' < /proc/swaps | grep -Fv "Filename" | cut -f3` ; do
    14351435            totalsize=$(($totalsize+$i))
    14361436            items=$(($items+1))
     
    14461446    if [ "$partition_mountpt" = "" ] ; then
    14471447        if [ "`pvdisplay $current_lvolume 2> /dev/null`" != "" ] || [ "`lvm pvdisplay $current_lvolume 2> /dev/null`" != "" ] ; then
    1448         if  [ "`fgrep device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then
     1448        if  [ "`grep -F device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then
    14491449            partition_mountpt="raid"
    14501450            partition_format="raid"
     
    14591459    echo "Examining $current_partition (mount=$partition_mountpt fmt=$partition_format psz=$psz)" >> $LOGFILE
    14601460    [ "$psz" != "lvm" ] && psz=$(($psz/1024))
    1461     if [ "`echo " $IMAGE_DEVS " | fgrep " $current_partition "`" != "" ] ; then
     1461    if [ "`echo " $IMAGE_DEVS " | grep -F " $current_partition "`" != "" ] ; then
    14621462        partition_mountpt="image"
    14631463            old_partition_fmt=$partition_format
     
    14741474            fi
    14751475    fi
    1476         if [ "$EXCLUDE_DEVS" ] && [ "`echo " $EXCLUDE_DEVS " | fgrep " $current_partition "`" ] || [ "`echo " $EXCLUDE_DEVS " | grep " $current_partition "`" ] ; then
     1476        if [ "$EXCLUDE_DEVS" ] && [ "`echo " $EXCLUDE_DEVS " | grep -F " $current_partition "`" ] || [ "`echo " $EXCLUDE_DEVS " | grep " $current_partition "`" ] ; then
    14771477            echo "Excluding $current_partition from mountlist" >> $LOGFILE
    14781478            continue
     
    14881488        if [ "$partition_format" = "Compaq diagnostics" ] ; then
    14891489        partition_format="compaq"
    1490         elif [ ! "`fgrep device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then
     1490        elif [ ! "`grep -F device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then
    14911491        LogIt "Unable to find mountpoint of $current_partition - ignoring\n"
    14921492        continue
     
    14991499        echo "Unknown partition (outstring = $unofficial_outstring)" >> $LOGFILE
    15001500    elif [ "$partition_mountpt" = "" ] && [ -f "/etc/raidtab" ] ; then
    1501         if [ "`fgrep device /etc/raidtab 2>/dev/null | fgrep $current_partition`" ] ; then
     1501        if [ "`grep -F device /etc/raidtab 2>/dev/null | grep -F $current_partition`" ] ; then
    15021502        partition_mountpt=raid
    15031503        partition_format=raid
     
    15451545    rmdir $1
    15461546    echo -en "  " > $1
    1547     if [ "`fgrep -i "debian" /etc/issue.net 2> /dev/null`" ] ; then
     1547    if [ "`grep -Fi "debian" /etc/issue.net 2> /dev/null`" ] ; then
    15481548        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
    15491549    else
     
    16101610    read i
    16111611    [ "$i" != "y" ] && [ "$i" != "Y" ] && return
    1612     mount | fgrep /dev/fd > /dev/null && Die "Please unmount your floppies first."
     1612    mount | grep -F /dev/fd > /dev/null && Die "Please unmount your floppies first."
    16131613    echo "WARNING! THIS WILL ERASE YOUR FLOPPY DISKS."
    16141614    [ ! -e "$boot_dev" ] && Die "Cannot find $boot_dev - is your Linux distro broken?"
    16151615    [ ! -e "$data_dev" ] && Die "Cannot find $data_dev - is your Linux distro broken?"
    1616     i=`find $imagesdir -type f | fgrep "/mindi-root.1" 2> /dev/null`
    1617     j=`find $imagesdir -type f | fgrep "/mindi-boot" | egrep -v '2880|5760'`
     1616    i=`find $imagesdir -type f | grep -F "/mindi-root.1" 2> /dev/null`
     1617    j=`find $imagesdir -type f | grep -F "/mindi-boot" | grep -Ev '2880|5760'`
    16181618#    echo "i=$i"
    16191619#    echo "j=$j"
     
    16251625    fi
    16261626    count=1
    1627     for i in `find $imagesdir | fgrep mindi-data` ; do
     1627    for i in `find $imagesdir | grep -F mindi-data` ; do
    16281628        CopyImageToDisk $i $data_dev "data disk #$count"
    16291629        count=$(($count+1))
     
    17141714    local disksize
    17151715    disksize=$1
    1716     if [ "`fgrep -i "debian" /etc/issue.net 2> /dev/null`" ] ; then
     1716    if [ "`grep -Fi "debian" /etc/issue.net 2> /dev/null`" ] ; then
    17171717        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`"/
    17181718    else
     
    20212021    fi
    20222022    if [ $? -ne "0" ] ; then
    2023     if [ "`fgrep "/tmp/dev.0" $LOGFILE`" ] ; then
     2023    if [ "`grep -F "/tmp/dev.0" $LOGFILE`" ] ; then
    20242024        LogIt "The '/tmp/dev.0' error is NOT Mindi's fault. It is LILO's.\n"
    20252025        LogIt "Please reboot your PC as a workaround.\n"
     
    24772477    local devpath drive res stub
    24782478    device=$1
    2479     if [ "`echo "$device" | fgrep "/dev/md"`" != "" ] ; then
     2479    if [ "`echo "$device" | grep -F "/dev/md"`" != "" ] ; then
    24802480    res=`SizeOfRaidPartition $device`
    24812481    [ "$res" = "" ] && Die "Cannot find $device's size - is your /etc/raidtab sane?"
     
    24902490    echo "------- $FDISK log end ------------" >> $LOGFILE
    24912491# end patch
    2492     [ "$res" = "" ] && res=`df -k -P -x supermount | tr -s '\t' ' ' | fgrep "$device " | cut -d' ' -f2`
     2492    [ "$res" = "" ] && res=`df -k -P -x supermount | tr -s '\t' ' ' | grep -F "$device " | cut -d' ' -f2`
    24932493    [ "$res" = "" ] && res="-1"
    24942494    echo $res
     
    26022602       root="/"
    26032603    fi
    2604     for fname in `find $root -maxdepth 2 -type f | fgrep lin | egrep -v '^/proc/|^/net/'` ; do
     2604    for fname in `find $root -maxdepth 2 -type f | grep -F lin | grep -Ev '^/proc/|^/net/'` ; do
    26052605    [ ! -e "$fname" ] && continue
    26062606        [ "$fname" = "/boot/vmlinuz.shipped" ] && [ -f "/boot/vmlinuz" ] && continue; # ignore SuSE's extra kernel
     
    26142614        [ "$fkern_ver" = "" ] && continue
    26152615#   echo "$fname --> $fkern_ver (but we want $we_want_version)" >> /dev/stderr
    2616         [ "`echo "$fkern_ver" |fgrep "$we_want_version "`" = "" ] && continue
     2616        [ "`echo "$fkern_ver" |grep -F "$we_want_version "`" = "" ] && continue
    26172617    [ -f "$fname" ] || continue
    26182618    [ -h "$fname" ] && continue
     
    26212621    if [ "$?" -eq "0" ] ; then
    26222622        # Used by ia64
    2623         if [ "`gzip -cd $fname | strings 2> /dev/null | fgrep "$kdate"`" = "" ] ; then
     2623        if [ "`gzip -cd $fname | strings 2> /dev/null | grep -F "$kdate"`" = "" ] ; then
    26242624            LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting? Naughty but I'll allow it...\n"
    26252625            duff_kernels="$fname $duff_kernels"
    26262626        else
    2627                 [ "`echo "$fname" | fgrep "vmlinux"`" ] && continue
     2627                [ "`echo "$fname" | grep -F "vmlinux"`" ] && continue
    26282628                possible_kernels="$fname $possible_kernels"
    26292629        fi
    26302630    else
    2631         if [ "`strings $fname 2> /dev/null | fgrep "$kdate"`" = "" ] ; then
     2631        if [ "`strings $fname 2> /dev/null | grep -F "$kdate"`" = "" ] ; then
    26322632            LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting?\n Naughty but I'll allow it...\n"
    26332633            duff_kernels="$fname $duff_kernels"
    26342634        else
    2635                 [ "`echo "$fname" | fgrep "vmlinux"`" ] && continue
     2635                [ "`echo "$fname" | grep -F "vmlinux"`" ] && continue
    26362636                possible_kernels="$fname $possible_kernels"
    26372637        fi
     
    26742674        fi
    26752675        done
    2676     if echo " $possible_kernels " | fgrep "/boot/vmlinuz " &> /dev/null ; then
     2676    if echo " $possible_kernels " | grep -F "/boot/vmlinuz " &> /dev/null ; then
    26772677        output=/boot/vmlinuz
    26782678        echo "Schlomo, this one's for you." >> $LOGFILE
     
    27032703    old_pwd=`pwd`
    27042704    cd $bigdir
    2705     list_of_files=`GetFileSizeList . | sort -nr | cut -f2 | fgrep -v "/dev/"`
     2705    list_of_files=`GetFileSizeList . | sort -nr | cut -f2 | grep -Fv "/dev/"`
    27062706    progress=0
    27072707    total_files=`CountItemsIn "$list_of_files"`
     
    28502850        echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE
    28512851        cp -df $i $mountpoint/ || LogIt "Unable to copy $i to $mountpoint\n"
    2852         [ "`echo "$i" | fgrep ".gz"`" ] && gunzip -f $mountpoint/`basename $i`
     2852        [ "`echo "$i" | grep -F ".gz"`" ] && gunzip -f $mountpoint/`basename $i`
    28532853    done
    28542854#    if [ -e "/dev/.devfsd" ] ; then
     
    29002900WhichOfTheseModulesAreLoaded() {
    29012901    local modname loaded_modules
    2902     loaded_modules=" `lsmod | tr -s ' ' '\t' | cut -f1 | fgrep -vx "Modules" | tr '\n' ' '` "
     2902    loaded_modules=" `lsmod | tr -s ' ' '\t' | cut -f1 | grep -Fvx "Modules" | tr '\n' ' '` "
    29032903    for modname in $1 ; do
    2904     [ "`echo "$loaded_modules" | fgrep " $modname "`" ] && echo "$modname"
     2904    [ "`echo "$loaded_modules" | grep -F " $modname "`" ] && echo "$modname"
    29052905    done
    29062906}
     
    30173017fi
    30183018FixPathIfBroken
    3019 [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | egrep "2\.[46]" | cut -d' ' -f1`
     3019[ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1`
    30203020AbortIfMkfsVfatMissing
    30213021### BCO
     
    30273027    FindLiloBinary
    30283028fi
    3029 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
     3029grep -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
    30303030rm -f /tmp/mindi_lo
    30313031trap "Aborted" SIGTERM
Note: See TracChangeset for help on using the changeset viewer.