Last change
on this file since 3659 was 2127, checked in by Bruno Cornec, 16 years ago |
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.
|
-
Property svn:executable
set to
*
|
File size:
722 bytes
|
Rev | Line | |
---|
[1698] | 1 | #!/bin/sh
|
---|
| 2 | #
|
---|
| 3 | # $Id$
|
---|
| 4 | #
|
---|
| 5 | # This script sets up the USB media
|
---|
| 6 | #
|
---|
| 7 |
|
---|
| 8 | # Get info from config file
|
---|
[2127] | 9 | MRUSBDEV=`grep usb-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
|
---|
[1698] | 10 |
|
---|
| 11 | # info from cmdline are predominent
|
---|
| 12 | for i in `cat /proc/cmdline` ; do
|
---|
[2127] | 13 | echo $i | grep -qi usb= && MRUSBDEV=`echo $i | cut -d= -f2`
|
---|
[1698] | 14 | done
|
---|
| 15 |
|
---|
[2127] | 16 | if [ $MRUSBDEV = "" ]; then
|
---|
[1698] | 17 | # No usb configuration neither stored during archive
|
---|
| 18 | # nor on cmdline so no usb wanted => exiting
|
---|
| 19 | exit 0
|
---|
| 20 | fi
|
---|
| 21 |
|
---|
[2127] | 22 | export MRUSBDEV
|
---|
| 23 |
|
---|
| 24 | echo -en "Mounting USB device (${MRUSBDEV}1) on /mnt/cdrom..."
|
---|
[1729] | 25 | /sbin/modprobe usb-storage
|
---|
[1732] | 26 | for i in 1 2 3 4 5 6 7 8 9 10 ; do
|
---|
| 27 | sleep 1
|
---|
| 28 | echo -en "."
|
---|
| 29 | done
|
---|
[2127] | 30 | mount -t vfat ${MRUSBDEV}1 /mnt/cdrom && LogIt "USB device (${MRUSBDEV}1) mounted on /mnt/cdrom"
|
---|
[1732] | 31 | echo "."
|
---|
Note:
See
TracBrowser
for help on using the repository browser.