Changeset 1958


Ignore:
Timestamp:
May 28, 2008, 1:59:55 PM (11 years ago)
Author:
bruno
Message:

Adds prliminary supoprt for OBDR at restore time (was partly coded but not really used up to now in fact)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.6/mindi/rootfs/sbin/init

    r1927 r1958  
    105105    [ "$1" != "" ] && tapedev=$1
    106106    [ ! "$tapedev" ] && tapedev=`grep media-dev /tmp/mondo-restore.cfg | tr -s ' ' ' ' | cut -d' ' -f2`
    107 #    tar -zxf $tapedev
     107    mt -f $tapedev fsf 2
    108108    dd if=$tapedev bs=32k count=1024 | tar -zx
    109109    res=$?
    110110    if [ "$res" -eq "0" ] ; then
    111         grep -v media-dev /tmp/mondo-restore.cfg > /tmp/mr.cfg
    112         echo "media-dev $tapedev" >> /tmp/mr.cfg
    113         cp -f /tmp/mr.cfg /tmp/mondo-restore.cfg
     111        # Store the dev name in case we changed it interactively
     112        sed -i "s/^media-dev .*$/media-dev  $tapedev/" /tmp/mondo-restore.cfg
     113
     114        #grep -v media-dev /tmp/mondo-restore.cfg > /tmp/mr.cfg
     115        #echo "media-dev $tapedev" >> /tmp/mr.cfg
     116        #cp -f /tmp/mr.cfg /tmp/mondo-restore.cfg
    114117    fi
    115118    cd $old_pwd
     
    121124    tapedev="" ; # will be set by UntarTapeStuff()
    122125    cd $GROOVY
    123     UntarTapeStuff $tapedev || UntarTapeStuff /dev/st0 || UntarTapeStuff /dev/osst0 || UntarTapeStuff /dev/ht0
     126    UntarTapeStuff $tapedev
    124127    res=$?
    125128    while [ "$res" -ne "0" ] ; do
     
    146149        res=$?
    147150    else
    148 #       clear
    149151        LogIt "Using tape as extended datadisk. Good." 3
    150152        echo "Using tape as extd ddisk." > /tmp/TAPEDEV-HAS-DATA-DISKS
     
    584586    export DENY_MODS=" "
    585587fi
    586 
     588if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg`" ]; then
     589    # Do not try to load usb storage when dealing with OBDR it makes the modprobe hang :-(
     590    export DENY_MODS="$DENY_MODS usb-storage"
     591fi
    587592if [ "`grep -i forcemods /proc/cmdline`" ]; then
    588593    export FORCE_MODS="`cat /proc/cmdline | sed 's~.*forcemods=\"\(.*\)\".*~\1~'` mondonone"
     
    623628fi
    624629
    625 if [ "`grep -i 'tape ' /tmp/mondo-restore.cfg`" ] || [ "`grep -i udev /tmp/mondo-restore.cfg`" ]; then
     630if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg`" ] || [ "`grep -i ' udev' /tmp/mondo-restore.cfg`" ]; then
    626631    HandleTape
    627632    ExtractDataDisksAndLoadModules
Note: See TracChangeset for help on using the changeset viewer.