Changeset 2127 in MondoRescue for branches/2.2.8/mindi/rootfs/sbin/start-usb


Ignore:
Timestamp:
Jan 14, 2009, 10:05:17 PM (15 years ago)
Author:
Bruno Cornec
Message:

When forcing a USB device through Boot CLI, mondorestore is now taking it in account as the restore deveice, instead of taking what is in the conf file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.8/mindi/rootfs/sbin/start-usb

    r1983 r2127  
    77
    88# Get info from config file
    9 usbdev=`grep usb-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     9MRUSBDEV=`grep usb-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    1010
    1111# info from cmdline are predominent
    1212for i in `cat /proc/cmdline` ; do
    13     echo $i | grep -qi usb= && usbdev=`echo $i | cut -d= -f2`
     13    echo $i | grep -qi usb= && MRUSBDEV=`echo $i | cut -d= -f2`
    1414done
    1515
    16 if [ $usbdev = "" ]; then
     16if [ $MRUSBDEV = "" ]; then
    1717    # No usb configuration neither stored during archive
    1818    # nor on cmdline so no usb wanted => exiting
     
    2020fi
    2121
    22 echo -en "Mounting USB device (${usbdev}1) on /mnt/cdrom..."
     22export MRUSBDEV
     23
     24echo -en "Mounting USB device (${MRUSBDEV}1) on /mnt/cdrom..."
    2325/sbin/modprobe usb-storage
    2426for i in 1 2 3 4 5 6 7 8 9 10 ; do
     
    2628        echo -en "."
    2729done
    28 mount -t vfat ${usbdev}1 /mnt/cdrom && LogIt "USB device (${usbdev}1) mounted on /mnt/cdrom"
     30mount -t vfat ${MRUSBDEV}1 /mnt/cdrom && LogIt "USB device (${MRUSBDEV}1) mounted on /mnt/cdrom"
    2931echo "."
Note: See TracChangeset for help on using the changeset viewer.