Changeset 1977 in MondoRescue for branches/stable/mindi/rootfs/sbin
- Timestamp:
- Jun 2, 2008, 10:49:01 AM (16 years ago)
- Location:
- branches/stable/mindi/rootfs/sbin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi/rootfs/sbin/init
r1939 r1977 105 105 [ "$1" != "" ] && tapedev=$1 106 106 [ ! "$tapedev" ] && tapedev=`grep media-dev /tmp/mondo-restore.cfg | tr -s ' ' ' ' | cut -d' ' -f2` 107 # tar -zxf $tapedev 107 mt -f $tapedev rewind 108 mt -f $tapedev fsf 2 108 109 dd if=$tapedev bs=32k count=1024 | tar -zx 109 110 res=$? 110 111 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 112 # 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 114 118 fi 115 119 cd $old_pwd … … 120 124 local res tapedev 121 125 tapedev="" ; # will be set by UntarTapeStuff() 126 127 # Here we can add the USB storage module, it's working even with OBDR ! 128 modprobe -q usb-storage 129 # Tape takes some time to appear 130 sleep 10 122 131 cd $GROOVY 123 UntarTapeStuff $tapedev || UntarTapeStuff /dev/st0 || UntarTapeStuff /dev/osst0 || UntarTapeStuff /dev/ht0132 UntarTapeStuff $tapedev 124 133 res=$? 125 134 while [ "$res" -ne "0" ] ; do … … 139 148 fi 140 149 done 150 # For post-init 151 export TAPEDEV=$tapedev 141 152 142 153 if [ "$res" -ne "0" ] ; then … … 146 157 res=$? 147 158 else 148 # clear149 159 LogIt "Using tape as extended datadisk. Good." 3 150 160 echo "Using tape as extd ddisk." > /tmp/TAPEDEV-HAS-DATA-DISKS … … 584 594 export DENY_MODS=" " 585 595 fi 586 596 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg`" ]; then 597 # Do not try to load usb storage when dealing with OBDR it makes the modprobe hang :-( 598 export DENY_MODS="usb-storage $DENY_MODS" 599 fi 587 600 if [ "`grep -i forcemods /proc/cmdline`" ]; then 588 601 export FORCE_MODS="`cat /proc/cmdline | sed 's~.*forcemods=\"\(.*\)\".*~\1~'` mondonone" … … 623 636 fi 624 637 625 if [ "`grep -i ' tape ' /tmp/mondo-restore.cfg`" ] || [ "`grep -i udev/tmp/mondo-restore.cfg`" ]; then638 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg`" ] || [ "`grep -i ' udev' /tmp/mondo-restore.cfg`" ]; then 626 639 HandleTape 627 640 ExtractDataDisksAndLoadModules … … 635 648 ExtractDataDisksAndLoadModules 636 649 elif [ "`grep -i usb= /proc/cmdline`" ] || [ "`grep -i usb /tmp/mondo-restore.cfg | grep media-type`" ]; then 637 # We need to get here exported variables from start-nfs638 650 . /sbin/start-usb 639 651 -
branches/stable/mindi/rootfs/sbin/post-init
r1621 r1977 104 104 done 105 105 106 mondoopt="" 107 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg`" ]; then 108 mondoopt="$mondoopt -o -d $TAPEDEV" 109 fi 110 111 if [ "`grep -i 'debug' /proc/cmdline`" ]; then 112 mondoopt="$mondoopt -K 99" 113 fi 114 106 115 if [ "$compare" ] ; then 107 116 LogIt "------------------COMPARE MODE-----------------" 1 108 mondorestore --compare117 mondorestore $mondoopt -Z compare 109 118 elif [ "$nuke" ] ; then 110 119 LogIt "-------------------NUKE MODE-------------------" 1 111 mondorestore --nuke120 mondorestore $mondoopt -Z nuke 112 121 elif [ "$expert" ] ; then 113 122 if [ "`grep tapedev /tmp/mondo-restore.cfg`" ] ; then … … 119 128 LogIt "Tape Mode -- calling mondorestore..." 120 129 if [ "$nuke" ] ; then 121 mondorestore --nuke130 mondorestore $mondoopt -Z nuke 122 131 else 123 mondorestore ; # MR will detect & access the tape132 mondorestore $mondoopt; # MR will detect & access the tape 124 133 fi 125 134 fi … … 132 141 LogIt "Cdstream Mode -- calling mondorestore..." 133 142 if [ "$nuke" ] ; then 134 mondorestore - -nuke143 mondorestore -Z nuke $mondoopt 135 144 else 136 mondorestore ; # MR will detect & access the cdstream145 mondorestore $mondoopt; # MR will detect & access the cdstream 137 146 fi 138 147 fi … … 147 156 else 148 157 LogIt "------------------INTERACTIVE------------------" 1 149 mondorestore - -interactive158 mondorestore -Z interactive $mondoopt 150 159 fi 151 160 152 [ -e "/tmp/DO-MBR-PLEASE" ] && LogIt "PLEASE RUN 'mondorestore - -mbr' NOW TO INITIALIZE YOUR BOOT SECTOR." 1161 [ -e "/tmp/DO-MBR-PLEASE" ] && LogIt "PLEASE RUN 'mondorestore -Z mbr' NOW TO INITIALIZE YOUR BOOT SECTOR." 1 153 162 154 163 exit 0
Note:
See TracChangeset
for help on using the changeset viewer.