Changeset 1983 in MondoRescue for branches/2.2.7/mindi/rootfs/sbin
- Timestamp:
- Jun 16, 2008, 9:40:42 PM (16 years ago)
- Location:
- branches/2.2.7/mindi/rootfs/sbin
- Files:
-
- 1 deleted
- 6 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.7/mindi/rootfs/sbin/find-and-mount-cdrom
r1888 r1983 7 7 for device in /dev/hd? /dev/scd? /dev/rcd? /dev/sr? /dev/cd? /dev/ide/*/*/*/*/cd /dev/scsi/*/*/*/*/cd; do 8 8 [ ! "$SECOND_TRY" ] && LogIt "Trying $device" 9 if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg `" ]; then9 if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg 2> /dev/null`" ]; then 10 10 pwd=`pwd` 11 11 cd $GROOVY … … 76 76 fi 77 77 [ "$1" = "--second-try" ] && exit 1; 78 if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg `" ] ; then78 if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg 2 > /dev/null`" ] ; then 79 79 LogIt "Because you are using cdstream, I won't try to mount CD." 80 80 exit 0 -
branches/2.2.7/mindi/rootfs/sbin/hack-cfg-if-necessary
r275 r1983 16 16 LogIt "OK, we've found /mnt/cdrom/archives/*; great." 17 17 18 if ! grep "backup-media-type iso" /tmp/mondo-restore.cfg ; then18 if ! grep "backup-media-type iso" /tmp/mondo-restore.cfg 2 > /dev/null ; then 19 19 LogIt "Config file is fine, BTW." 20 20 exit 0 … … 22 22 23 23 LogIt "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 24 sed -i 's/backup-media-type iso/backup-media-type cdr/' /tmp/mondo-restore.cfg 26 25 LogIt "Done re-jigging. Yay." 27 26 exit 0 -
branches/2.2.7/mindi/rootfs/sbin/ide-opt
r1982 r1983 18 18 if [ "$cdrom_lives_here" = "$dev" ] ; then 19 19 # -c 1 20 hdparm -u 1 -d 1 /dev/$dev &> /tmp/oid1.log20 hdparm -u 1 -d 1 /dev/$dev > /tmp/oid1.log 2> /dev/null 21 21 else 22 22 # -X34 -X66 23 hdparm -u1 -d1 -c1 -m8 -W1 /dev/$dev &> /tmp/oid1.log23 hdparm -u1 -d1 -c1 -m8 -W1 /dev/$dev > /tmp/oid1.log 2> /dev/null 24 24 fi 25 25 cat /tmp/oid1.log >> /tmp/oid.log … … 30 30 #fi 31 31 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."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." 34 34 35 35 exit 0 -
branches/2.2.7/mindi/rootfs/sbin/init
r1968 r1983 104 104 cd $GROOVY 105 105 [ "$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` 107 107 mt -f $tapedev rewind 108 108 mt -f $tapedev fsf 2 … … 111 111 if [ "$res" -eq "0" ] ; then 112 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 113 if [ -f "/tmp/mondo-restore.cfg" ]; then 114 sed -i "s/^media-dev .*$/media-dev $tapedev/" /tmp/mondo-restore.cfg 115 fi 118 116 fi 119 117 cd $old_pwd … … 453 451 local res 454 452 mount | grep /mnt/cdrom && return 0 455 [ "`grep "backup_media_type" /tmp/mondo-restore.cfg | grep "cdstream"`" ] && return453 [ "`grep "backup_media_type" /tmp/mondo-restore.cfg 2> /dev/null | grep "cdstream"`" ] && return 456 454 LogIt "Trying to mount CD-ROM a 2nd time..." 457 455 find-and-mount-cdrom --second-try … … 594 592 export DENY_MODS=" " 595 593 fi 596 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg `" ]; then594 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2> /dev/null`" ]; then 597 595 # Do not try to load usb storage when dealing with OBDR it makes the modprobe hang :-( 598 596 export DENY_MODS="usb-storage $DENY_MODS" … … 636 634 fi 637 635 638 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg `" ] || [ "`grep -i ' udev' /tmp/mondo-restore.cfg`" ]; then636 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2>/dev/null`" ] || [ "`grep -i ' udev' /tmp/mondo-restore.cfg 2>/dev/null`" ]; then 639 637 HandleTape 640 638 ExtractDataDisksAndLoadModules … … 647 645 CD_MOUNTED_OK=yes 648 646 ExtractDataDisksAndLoadModules 649 elif [ "`grep -i usb= /proc/cmdline`" ] || [ "`grep -i usb /tmp/mondo-restore.cfg | grep media-type`" ]; then647 elif [ "`grep -i usb= /proc/cmdline`" ] || [ "`grep -i usb /tmp/mondo-restore.cfg 2>/dev/null | grep media-type`" ]; then 650 648 . /sbin/start-usb 651 649 … … 718 716 dmesg >> $LOGFILE 719 717 720 #------------------------------- 721 #ABSORBENTANDYELLOWANDPOROUSISHE#;# --- don't touch this either :) 722 #------------------------------- 718 ide-opt 723 719 724 720 #ctrlaltdel soft -
branches/2.2.7/mindi/rootfs/sbin/post-init
r1967 r1983 105 105 106 106 mondoopt="" 107 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg `" ]; then107 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2> /dev/null`" ]; then 108 108 mondoopt="$mondoopt -o -d $TAPEDEV" 109 109 fi … … 120 120 mondorestore $mondoopt -Z nuke 121 121 elif [ "$expert" ] ; then 122 if [ "`grep tapedev /tmp/mondo-restore.cfg `" ] ; then122 if [ "`grep tapedev /tmp/mondo-restore.cfg 2> /dev/null`" ] ; then 123 123 LogIt "-------------------TAPE MODE-------------------" 1 124 124 loc=`which mondorestore 2> /dev/null` … … 133 133 fi 134 134 fi 135 elif [ "`grep using-cdstream /tmp/mondo-restore.cfg `" ] ; then135 elif [ "`grep using-cdstream /tmp/mondo-restore.cfg 2> /dev/null`" ] ; then 136 136 LogIt "------------------CDSTREAM MODE------------------" 1 137 137 loc=`which mondorestore 2> /dev/null` -
branches/2.2.7/mindi/rootfs/sbin/start-nfs
r1927 r1983 11 11 12 12 # 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-`13 ipdev=`grep nfs-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-` 14 ipaddress=`grep nfs-client-ipaddr /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-` 15 ipnetmask=`grep nfs-client-netmask /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-` 16 ipbroadcast=`grep nfs-client-broadcast /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-` 17 ipgateway=`grep nfs-client-defgw /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-` 18 18 ipconf="" 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-`19 export nfsmount=`grep nfs-server-mount /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-` 20 export imgname=`grep iso-prefix /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-` 21 21 if [ "$imgname" = "" ]; then 22 22 export imgname="mondorescue" 23 23 fi 24 export dirimg=`grep nfs-server-path /tmp/mondo-restore.cfg | cut -d' ' -f2-`24 export dirimg=`grep nfs-server-path /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-` 25 25 if [ "$dirimg" = "" ]; then 26 26 export dirimg="/" -
branches/2.2.7/mindi/rootfs/sbin/start-usb
r1787 r1983 7 7 8 8 # Get info from config file 9 usbdev=`grep usb-dev /tmp/mondo-restore.cfg | cut -d' ' -f2-`9 usbdev=`grep usb-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-` 10 10 11 11 # info from cmdline are predominent
Note:
See TracChangeset
for help on using the changeset viewer.