Ignore:
Timestamp:
Jan 3, 2006, 4:09:12 PM (15 years ago)
Author:
bcornec
Message:

Patches from Sébastien Aperghis-Tramoni <maddingue@…>

replace several occurences of "cat .. | grep .."
or with similar commands that accept filenames as arguments.
+ some sort | uniq replaced by sort -u

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.06/mindi/rootfs/sbin/post-init

    r232 r273  
    5959cat /tmp/mountlist.txt >> /tmp/mondo-restore.log
    6060
    61 iso=`cat /proc/cmdline | grep "iso"`
    62 nuke=`cat /proc/cmdline | grep "nuke"`
     61iso=`grep iso /proc/cmdline`
     62nuke=`grep nuke /proc/cmdline`
    6363if [ "$nuke" = "" ] ; then
    64     nuke=`cat /proc/cmdline | grep -i "RESTORE "`
     64    nuke=`grep -i "RESTORE " /proc/cmdline`
    6565fi
    66 expert=`cat /proc/cmdline | grep "expert"`
    67 compare=`cat /proc/cmdline | grep "compare"`
    68 interactive=`cat /proc/cmdline | grep "interactive"`
     66expert=`grep expert /proc/cmdline`
     67compare=`grep compare /proc/cmdline`
     68interactive=`grep interactive /proc/cmdline`
    6969[ "$interactive" ]  && expert=""; # in case 'expert' crops up somewhere
    7070if which mondorestore > /dev/null 2> /dev/null ; then
     
    112112    mondorestore --nuke
    113113elif [ "$expert" ] ; then
    114     if [ "`cat /tmp/mondo-restore.cfg | grep tapedev`" ] ; then
     114    if [ "`grep tapedev /tmp/mondo-restore.cfg`" ] ; then
    115115    LogIt "-------------------TAPE MODE-------------------" 1
    116116    loc=`which mondorestore 2> /dev/null`
     
    125125            fi
    126126    fi
    127     elif [ "`cat /tmp/mondo-restore.cfg | grep using-cdstream`" ] ; then
     127    elif [ "`grep using-cdstream /tmp/mondo-restore.cfg`" ] ; then
    128128        LogIt "------------------CDSTREAM MODE------------------" 1
    129129        loc=`which mondorestore 2> /dev/null`
Note: See TracChangeset for help on using the changeset viewer.