Changeset 244 in MondoRescue for trunk/mindi/rootfs


Ignore:
Timestamp:
Dec 20, 2005, 10:38:54 AM (18 years ago)
Author:
bcornec
Message:

merge -r239:243 $SVN_M/branches/2.05

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mindi/rootfs/sbin/init

    r236 r244  
    256256    cd $GROOVY
    257257    [ "$1" != "" ] && tapedev=$1
    258     [ ! "$tapedev" ] && tapedev=`cat /tmp/mondo-restore.cfg | grep media-dev | tr -s ' ' ' ' | cut -d' ' -f2`
     258    [ ! "$tapedev" ] && tapedev=`grep media-dev /tmp/mondo-restore.cfg | tr -s ' ' ' ' | cut -d' ' -f2`
    259259#    tar -zxf $tapedev
    260260    dd if=$tapedev bs=32k count=1024 | tar -zx
    261261    res=$?
    262262    if [ "$res" -eq "0" ] ; then
    263     cat /tmp/mondo-restore.cfg | grep -v media-dev > /tmp/mr.cfg
     263    grep -v media-dev /tmp/mondo-restore.cfg > /tmp/mr.cfg
    264264    echo "media-dev $tapedev" >> /tmp/mr.cfg
    265265        cp -f /tmp/mr.cfg /tmp/mondo-restore.cfg
     
    442442        vgscan
    443443    fi
    444         cat /tmp/i-want-my-lvm | grep -E "^#.*vgchange" | sed s/#// > /tmp/start-lvm
     444        grep -E "^#.*vgchange" /tmp/i-want-my-lvm | sed s/#// > /tmp/start-lvm
    445445        chmod +x /tmp/start-lvm
    446446        echo -en "Starting LVM's..."
     
    476476StartRaids() {
    477477    local raid_devices i
    478     raid_devices=`cat /tmp/mountlist.txt | grep /dev/md | cut -d' ' -f1`
     478    raid_devices=`grep /dev/md /tmp/mountlist.txt | cut -d' ' -f1`
    479479    for i in $raid_devices ; do
    480         if cat /proc/mdstat | grep `basename $i` > /dev/null 2> /dev/null ; then
     480        if grep `basename $i` /proc/mdstat > /dev/null 2> /dev/null ; then
    481481            LogIt "$i is started already; no need to run 'raidstart $i'" 1
    482482        else
     
    503503    local res
    504504    mount | grep /mnt/cdrom && return 0
    505     [ "`cat /tmp/mondo-restore.cfg | grep "backup_media_type" | grep "cdstream"`" ] && return
     505    [ "`grep "backup_media_type" /tmp/mondo-restore.cfg | grep "cdstream"`" ] && return
    506506    LogIt "Trying to mount CD-ROM a 2nd time..."
    507507    find-and-mount-cdrom --second-try
     
    626626else
    627627    if [ -e "/sbin/start-nfs" ]; then
    628         if [ "`cat /proc/cmdline | grep -i pxe`" ]; then
     628        if [ "`grep -i pxe /proc/cmdline`" ]; then
    629629            LogIt "PXE boot found"
    630630        fi
     
    633633            imgname="mondorescue"
    634634        fi
    635         if [ "`cat /proc/cmdline | grep -i prefix`" ] ; then
     635        if [ "`grep -i prefix /proc/cmdline`" ] ; then
    636636            for i in `cat /proc/cmdline` ; do
    637637                if [ "`echo $i | grep -i prefix`" ] ; then
     
    678678sleep 2
    679679#clear
    680 if [ -e "/dev/md0" ] && [ ! -e "/dev/md/0" ] && [ "`cat /tmp/mountlist.txt | grep /dev/md/`" != "" ] ; then
     680if [ -e "/dev/md0" ] && [ ! -e "/dev/md/0" ] && [ "`grep /dev/md/ /tmp/mountlist.txt`" != "" ] ; then
    681681    LogIt "Creating /dev/md/* softlinks just in case." 1
    682682    mkdir -p /dev/md
     
    690690[ -e "/tmp/mountlist.txt" ] && cp -f /tmp/mountlist.txt /tmp/mountlist.original
    691691
    692 if ! [ "`cat /proc/cmdline | grep -i "pxe"`" ] ; then
     692if ! [ "`grep -i "pxe" /proc/cmdline`" ] ; then
    693693    res="`cat /mnt/cdrom/archives/THIS-CD-NUMBER 2> /dev/null`"
    694694    [ "$res" != "1" ] && [ "$res" != "" ] && Die "This is CD #$res in the series. Please insert CD #1."
     
    705705
    706706lsmod > /tmp/ramdisk-lsmod.txt 2> /dev/null
    707 cat /tmp/original-lsmod.txt /tmp/original-lsmod.txt /tmp/ramdisk-lsmod.txt | cut -d' ' -f1 | sort | uniq -d > /tmp/missing-modules.txt
     707cut -d' ' -f1 /tmp/original-lsmod.txt /tmp/original-lsmod.txt /tmp/ramdisk-lsmod.txt | sort | uniq -d > /tmp/missing-modules.txt
    708708echo "Warning - these modules did not make it onto the ramdisk" >> $LOGFILE
    709709cat /tmp/missing-modules.txt >> $LOGFILE
Note: See TracChangeset for help on using the changeset viewer.