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


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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.