Changeset 1962


Ignore:
Timestamp:
May 28, 2008, 5:22:39 PM (11 years ago)
Author:
bruno
Message:
  • rewind tape for OBDR support before positioning to fsf 2
  • export TAPEDEV for post-init and pass options to mondorestore
Location:
branches/2.2.6
Files:
3 edited

Legend:

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

    r1960 r1962  
    105105    [ "$1" != "" ] && tapedev=$1
    106106    [ ! "$tapedev" ] && tapedev=`grep media-dev /tmp/mondo-restore.cfg | tr -s ' ' ' ' | cut -d' ' -f2`
     107    mt -f $tapedev rewind
    107108    mt -f $tapedev fsf 2
    108109    dd if=$tapedev bs=32k count=1024 | tar -zx
     
    142143        fi
    143144    done
     145    # For post-init
     146    export TAPEDEV=$tapedev
    144147
    145148    if [ "$res" -ne "0" ] ; then
  • branches/2.2.6/mindi/rootfs/sbin/post-init

    r1612 r1962  
    104104done
    105105
     106mondoopt=""
     107if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg`" ]; then
     108    mondoopt="$mondoopt -o -d $TAPEDEV"
     109fi
     110
     111if [ "`grep -i 'debug' /proc/cmdline`" ]; then
     112    mondoopt="$mondoopt -K 99"
     113fi
     114
    106115if [ "$compare" ] ; then
    107116    LogIt "------------------COMPARE MODE-----------------" 1
    108     mondorestore --compare
     117    mondorestore $mondoopt --compare
    109118elif [ "$nuke" ] ; then
    110119    LogIt "-------------------NUKE MODE-------------------" 1
    111     mondorestore --nuke
     120    mondorestore $mondoopt --nuke
    112121elif [ "$expert" ] ; then
    113122    if [ "`grep tapedev /tmp/mondo-restore.cfg`" ] ; then
     
    119128        LogIt "Tape Mode -- calling mondorestore..."
    120129            if [ "$nuke" ] ; then
    121                 mondorestore --nuke
     130                mondorestore $mondoopt --nuke
    122131            else
    123                 mondorestore; # MR will detect & access the tape
     132                mondorestore $mondoopt; # MR will detect & access the tape
    124133            fi
    125134    fi
     
    132141            LogIt "Cdstream Mode -- calling mondorestore..."
    133142            if [ "$nuke" ] ; then
    134                 mondorestore --nuke
     143                mondorestore --nuke $mondoopt
    135144            else
    136                 mondorestore; # MR will detect & access the cdstream
     145                mondorestore $mondoopt; # MR will detect & access the cdstream
    137146            fi
    138147        fi
     
    147156else
    148157    LogIt "------------------INTERACTIVE------------------" 1
    149     mondorestore --interactive
     158    mondorestore --interactive $mondoopt
    150159fi
    151160
  • branches/2.2.6/mondo/src/common/libmondo-stream.c

    r1956 r1962  
    685685
    686686    log_it("Skipping OBDR headers");
     687    asprintf(&command, "mt -f %s rewind",bkpinfo->media_device);
     688    res = run_program_and_log_output(command, 1);
     689    paranoid_free(command);
     690
    687691    asprintf(&command, "mt -f %s fsf 2",bkpinfo->media_device);
    688692    res = run_program_and_log_output(command, 1);
Note: See TracChangeset for help on using the changeset viewer.