Last change
on this file since 2896 was 2591, checked in by Bruno Cornec, 15 years ago |
r3723@localhost: bruno | 2010-03-09 23:56:51 +0100
- No error msg if mondorestore.cfg doesn't exist (mindi alone)
|
-
Property svn:executable
set to
*
|
File size:
786 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
|
---|
[2591] | 9 | MRUSBDEV=""
|
---|
| 10 | if [ -f $MINDI_CACHE/mondorestore.cfg ]; then
|
---|
| 11 | MRUSBDEV=`grep usb-dev $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
|
---|
| 12 | fi
|
---|
[1698] | 13 |
|
---|
| 14 | # info from cmdline are predominent
|
---|
[2329] | 15 | for i in `cat $CMDLINE` ; do
|
---|
[2127] | 16 | echo $i | grep -qi usb= && MRUSBDEV=`echo $i | cut -d= -f2`
|
---|
[1698] | 17 | done
|
---|
| 18 |
|
---|
[2127] | 19 | if [ $MRUSBDEV = "" ]; then
|
---|
[1698] | 20 | # No usb configuration neither stored during archive
|
---|
| 21 | # nor on cmdline so no usb wanted => exiting
|
---|
| 22 | exit 0
|
---|
| 23 | fi
|
---|
| 24 |
|
---|
[2127] | 25 | export MRUSBDEV
|
---|
| 26 |
|
---|
| 27 | echo -en "Mounting USB device (${MRUSBDEV}1) on /mnt/cdrom..."
|
---|
[1729] | 28 | /sbin/modprobe usb-storage
|
---|
[1732] | 29 | for i in 1 2 3 4 5 6 7 8 9 10 ; do
|
---|
| 30 | sleep 1
|
---|
| 31 | echo -en "."
|
---|
| 32 | done
|
---|
[2127] | 33 | mount -t vfat ${MRUSBDEV}1 /mnt/cdrom && LogIt "USB device (${MRUSBDEV}1) mounted on /mnt/cdrom"
|
---|
[1732] | 34 | echo "."
|
---|
Note:
See
TracBrowser
for help on using the repository browser.