Last change
on this file since 1731 was 1729, checked in by Bruno Cornec, 17 years ago |
Still trying to activate USB correctly at boot time with udev
|
-
Property svn:executable
set to
*
|
File size:
956 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 | usbdev=`grep usb-dev /tmp/mondo-restore.cfg | cut -d' ' -f2-`
|
---|
10 |
|
---|
11 | # info from cmdline are predominent
|
---|
12 | for i in `cat /proc/cmdline` ; do
|
---|
13 | echo $i | grep -qi usb= && usbdev=`echo $i | cut -d= -f2`
|
---|
14 | done
|
---|
15 |
|
---|
16 | if [ $usbdev = "" ]; then
|
---|
17 | # No usb configuration neither stored during archive
|
---|
18 | # nor on cmdline so no usb wanted => exiting
|
---|
19 | exit 0
|
---|
20 | fi
|
---|
21 |
|
---|
22 | needusbstorage=`LC_ALL=C grep -e "^I.*Cls=08" /proc/bus/usb/devices 2>/dev/null`
|
---|
23 | unamer=`uname -r`
|
---|
24 | min=`echo $unamer | cut -d. -f2`
|
---|
25 | [ -n "$needusbstorage" -a "$min" = "4" ] && /sbin/modprobe usb-storage >/dev/null 2>&1
|
---|
26 |
|
---|
27 | [ -d /proc/bus/usb ] && ! grep -q /proc/bus/usb /proc/mounts && mount -t usbfs none /proc/bus/usb
|
---|
28 |
|
---|
29 | LogIt "Mounting USB device (${usbdev}1) on /mnt/cdrom..."
|
---|
30 | sync
|
---|
31 | sleep 2
|
---|
32 | ls -l ${usbdev}1
|
---|
33 | mount -t vfat ${usbdev}1 /mnt/cdrom
|
---|
34 | /sbin/modprobe usb-storage
|
---|
35 | sleep 10
|
---|
36 | ls -l ${usbdev}1
|
---|
37 | mount -t vfat ${usbdev}1 /mnt/cdrom
|
---|
Note:
See
TracBrowser
for help on using the repository browser.