source: MondoRescue/branches/2.2.10/mindi/rootfs/sbin/start-usb@ 2591

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