Last change
on this file since 2592 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
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # $Id$
|
---|
4 | #
|
---|
5 | # This script sets up the USB media
|
---|
6 | #
|
---|
7 |
|
---|
8 | # Get info from config file
|
---|
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
|
---|
13 |
|
---|
14 | # info from cmdline are predominent
|
---|
15 | for i in `cat $CMDLINE` ; do
|
---|
16 | echo $i | grep -qi usb= && MRUSBDEV=`echo $i | cut -d= -f2`
|
---|
17 | done
|
---|
18 |
|
---|
19 | if [ $MRUSBDEV = "" ]; then
|
---|
20 | # No usb configuration neither stored during archive
|
---|
21 | # nor on cmdline so no usb wanted => exiting
|
---|
22 | exit 0
|
---|
23 | fi
|
---|
24 |
|
---|
25 | export MRUSBDEV
|
---|
26 |
|
---|
27 | echo -en "Mounting USB device (${MRUSBDEV}1) on /mnt/cdrom..."
|
---|
28 | /sbin/modprobe usb-storage
|
---|
29 | for i in 1 2 3 4 5 6 7 8 9 10 ; do
|
---|
30 | sleep 1
|
---|
31 | echo -en "."
|
---|
32 | done
|
---|
33 | mount -t vfat ${MRUSBDEV}1 /mnt/cdrom && LogIt "USB device (${MRUSBDEV}1) mounted on /mnt/cdrom"
|
---|
34 | echo "."
|
---|
Note:
See
TracBrowser
for help on using the repository browser.