Changeset 1983 in MondoRescue for branches/2.2.7/mindi/rootfs


Ignore:
Timestamp:
Jun 16, 2008, 9:40:42 PM (16 years ago)
Author:
Bruno Cornec
Message:
  • Remove aux-tools dir in mindi (either scripts moved or removed)
  • Remove isolinux and syslinux static files from mindi. Now generated
  • Remove lilo support for ia32 now useless in mindi
  • Remoce empty directories in rootfs in mindi
  • Remove HackSyslinuxFile, CopyBootBFile, FindLiloBinary, FindSensibleBootBFile, MakeSyslinuxMessageFile, MakeLiloConfFile, ReplaceIndividualLine in mindi
  • Adds a single MakeBootConfFile function to dynamiclly create needed conf files in mindi
  • Avoids error messages when using only mindi with a non-existant /tmp/mondo-restore.cfg
Location:
branches/2.2.7/mindi/rootfs
Files:
9 deleted
6 edited
2 moved

Legend:

Unmodified
Added
Removed
  • branches/2.2.7/mindi/rootfs/sbin/find-and-mount-cdrom

    r1888 r1983  
    77    for device in /dev/hd? /dev/scd? /dev/rcd? /dev/sr? /dev/cd? /dev/ide/*/*/*/*/cd /dev/scsi/*/*/*/*/cd; do
    88        [ ! "$SECOND_TRY" ] && LogIt "Trying $device"
    9         if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg`" ]; then
     9        if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg 2> /dev/null`" ]; then
    1010            pwd=`pwd`
    1111            cd $GROOVY
     
    7676fi
    7777[ "$1" = "--second-try" ] && exit 1;
    78 if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg`" ] ; then
     78if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg 2 > /dev/null`" ] ; then
    7979    LogIt "Because you are using cdstream, I won't try to mount CD."
    8080    exit 0
  • branches/2.2.7/mindi/rootfs/sbin/hack-cfg-if-necessary

    r275 r1983  
    1616LogIt "OK, we've found /mnt/cdrom/archives/*; great."
    1717
    18 if ! grep "backup-media-type iso" /tmp/mondo-restore.cfg ; then
     18if ! grep "backup-media-type iso" /tmp/mondo-restore.cfg 2 > /dev/null ; then
    1919    LogIt "Config file is fine, BTW."
    2020    exit 0
     
    2222
    2323LogIt "Re-jigging mondo-restore.cfg because you backed up to ISOs and then burned them to CDs" 1
    24 mv -f /tmp/mondo-restore.cfg /tmp/mrco
    25 sed 's/backup-media-type iso/backup-media-type cdr/' /tmp/mrco > /tmp/mondo-restore.cfg
     24sed -i 's/backup-media-type iso/backup-media-type cdr/' /tmp/mondo-restore.cfg
    2625LogIt "Done re-jigging. Yay."
    2726exit 0
  • branches/2.2.7/mindi/rootfs/sbin/ide-opt

    r1982 r1983  
    1818    if [ "$cdrom_lives_here" = "$dev" ] ; then
    1919# -c 1
    20         hdparm -u 1 -d 1 /dev/$dev &> /tmp/oid1.log
     20        hdparm -u 1 -d 1 /dev/$dev > /tmp/oid1.log 2> /dev/null
    2121    else
    2222# -X34 -X66
    23         hdparm -u1 -d1 -c1 -m8 -W1 /dev/$dev &> /tmp/oid1.log
     23        hdparm -u1 -d1 -c1 -m8 -W1 /dev/$dev > /tmp/oid1.log 2> /dev/null
    2424    fi
    2525    cat /tmp/oid1.log >> /tmp/oid.log
     
    3030#fi
    3131
    32 #echo "'ide-opt' has tried to optimize IDE access. If you saw lots of warnings,"
    33 #echo "optimization failed (not important, really); otherwise, it succeeded."
     32echo "'ide-opt' has tried to optimize IDE access. If you saw lots of warnings,"
     33echo "optimization failed (not important, really); otherwise, it succeeded."
    3434
    3535exit 0
  • branches/2.2.7/mindi/rootfs/sbin/init

    r1968 r1983  
    104104    cd $GROOVY
    105105    [ "$1" != "" ] && tapedev=$1
    106     [ ! "$tapedev" ] && tapedev=`grep media-dev /tmp/mondo-restore.cfg | tr -s ' ' ' ' | cut -d' ' -f2`
     106    [ ! "$tapedev" ] && tapedev=`grep media-dev /tmp/mondo-restore.cfg 2>/dev/null | tr -s ' ' ' ' | cut -d' ' -f2`
    107107    mt -f $tapedev rewind
    108108    mt -f $tapedev fsf 2
     
    111111    if [ "$res" -eq "0" ] ; then
    112112        # Store the dev name in case we changed it interactively
    113         sed -i "s/^media-dev .*$/media-dev  $tapedev/" /tmp/mondo-restore.cfg
    114 
    115         #grep -v media-dev /tmp/mondo-restore.cfg > /tmp/mr.cfg
    116         #echo "media-dev $tapedev" >> /tmp/mr.cfg
    117         #cp -f /tmp/mr.cfg /tmp/mondo-restore.cfg
     113        if [ -f "/tmp/mondo-restore.cfg" ]; then
     114            sed -i "s/^media-dev .*$/media-dev  $tapedev/" /tmp/mondo-restore.cfg
     115        fi
    118116    fi
    119117    cd $old_pwd
     
    453451    local res
    454452    mount | grep /mnt/cdrom && return 0
    455     [ "`grep "backup_media_type" /tmp/mondo-restore.cfg | grep "cdstream"`" ] && return
     453    [ "`grep "backup_media_type" /tmp/mondo-restore.cfg 2> /dev/null | grep "cdstream"`" ] && return
    456454    LogIt "Trying to mount CD-ROM a 2nd time..."
    457455    find-and-mount-cdrom --second-try
     
    594592    export DENY_MODS=" "
    595593fi
    596 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg`" ]; then
     594if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2> /dev/null`" ]; then
    597595    # Do not try to load usb storage when dealing with OBDR it makes the modprobe hang :-(
    598596    export DENY_MODS="usb-storage $DENY_MODS"
     
    636634fi
    637635
    638 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg`" ] || [ "`grep -i ' udev' /tmp/mondo-restore.cfg`" ]; then
     636if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2>/dev/null`" ] || [ "`grep -i ' udev' /tmp/mondo-restore.cfg 2>/dev/null`" ]; then
    639637    HandleTape
    640638    ExtractDataDisksAndLoadModules
     
    647645    CD_MOUNTED_OK=yes
    648646    ExtractDataDisksAndLoadModules
    649 elif [ "`grep -i usb= /proc/cmdline`" ] || [ "`grep -i usb /tmp/mondo-restore.cfg | grep media-type`" ]; then
     647elif [ "`grep -i usb= /proc/cmdline`" ] || [ "`grep -i usb /tmp/mondo-restore.cfg 2>/dev/null | grep media-type`" ]; then
    650648    . /sbin/start-usb
    651649
     
    718716dmesg >> $LOGFILE
    719717
    720 #-------------------------------
    721 #ABSORBENTANDYELLOWANDPOROUSISHE#;# --- don't touch this either :)
    722 #-------------------------------
     718ide-opt
    723719
    724720#ctrlaltdel soft
  • branches/2.2.7/mindi/rootfs/sbin/post-init

    r1967 r1983  
    105105
    106106mondoopt=""
    107 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg`" ]; then
     107if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2> /dev/null`" ]; then
    108108    mondoopt="$mondoopt -o -d $TAPEDEV"
    109109fi
     
    120120    mondorestore $mondoopt -Z nuke
    121121elif [ "$expert" ] ; then
    122     if [ "`grep tapedev /tmp/mondo-restore.cfg`" ] ; then
     122    if [ "`grep tapedev /tmp/mondo-restore.cfg 2> /dev/null`" ] ; then
    123123    LogIt "-------------------TAPE MODE-------------------" 1
    124124    loc=`which mondorestore 2> /dev/null`
     
    133133            fi
    134134    fi
    135     elif [ "`grep using-cdstream /tmp/mondo-restore.cfg`" ] ; then
     135    elif [ "`grep using-cdstream /tmp/mondo-restore.cfg 2> /dev/null`" ] ; then
    136136        LogIt "------------------CDSTREAM MODE------------------" 1
    137137        loc=`which mondorestore 2> /dev/null`
  • branches/2.2.7/mindi/rootfs/sbin/start-nfs

    r1927 r1983  
    1111
    1212# Get info from config file
    13 ipdev=`grep nfs-dev /tmp/mondo-restore.cfg | cut -d' ' -f2-`
    14 ipaddress=`grep nfs-client-ipaddr /tmp/mondo-restore.cfg | cut -d' ' -f2-`
    15 ipnetmask=`grep nfs-client-netmask /tmp/mondo-restore.cfg | cut -d' ' -f2-`
    16 ipbroadcast=`grep nfs-client-broadcast /tmp/mondo-restore.cfg | cut -d' ' -f2-`
    17 ipgateway=`grep nfs-client-defgw /tmp/mondo-restore.cfg | cut -d' ' -f2-`
     13ipdev=`grep nfs-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     14ipaddress=`grep nfs-client-ipaddr /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     15ipnetmask=`grep nfs-client-netmask /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     16ipbroadcast=`grep nfs-client-broadcast /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     17ipgateway=`grep nfs-client-defgw /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    1818ipconf=""
    19 export nfsmount=`grep nfs-server-mount /tmp/mondo-restore.cfg | cut -d' ' -f2-`
    20 export imgname=`grep iso-prefix /tmp/mondo-restore.cfg | cut -d' ' -f2-`
     19export nfsmount=`grep nfs-server-mount /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     20export imgname=`grep iso-prefix /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    2121if [ "$imgname" = "" ]; then
    2222    export imgname="mondorescue"
    2323fi
    24 export dirimg=`grep nfs-server-path /tmp/mondo-restore.cfg | cut -d' ' -f2-`
     24export dirimg=`grep nfs-server-path /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    2525if [ "$dirimg" = "" ]; then
    2626    export dirimg="/"
  • branches/2.2.7/mindi/rootfs/sbin/start-usb

    r1787 r1983  
    77
    88# Get info from config file
    9 usbdev=`grep usb-dev /tmp/mondo-restore.cfg | cut -d' ' -f2-`
     9usbdev=`grep usb-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    1010
    1111# info from cmdline are predominent
Note: See TracChangeset for help on using the changeset viewer.