summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Capriotti <l.capriotti@xbmc.org>2010-02-20 08:45:59 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:48:07 +0100
commita16e96b9f2baf702da7104d6ccd3bf61dbd49319 (patch)
tree6e37c6531f63c9980dc253c8b24b3821a56f0139
parentdca16427ad073226f2745f14fdf2c27b41b013eb (diff)
downloadlive-boot-a16e96b9f2baf702da7104d6ccd3bf61dbd49319.tar.gz
live-boot-a16e96b9f2baf702da7104d6ccd3bf61dbd49319.zip
Skip loading usb modules when quickusbmodules parameter is specified.
-rwxr-xr-xscripts/live62
1 files changed, 35 insertions, 27 deletions
diff --git a/scripts/live b/scripts/live
index a8dc6c8..9baf5a9 100755
--- a/scripts/live
+++ b/scripts/live
@@ -401,6 +401,11 @@ Arguments ()
export NOPERSISTENT
;;
+ quickusbmodules)
+ QUICKUSBMODULES="Yes"
+ export QUICKUSBMODULES
+ ;;
+
preseed/file=*|file=*)
LOCATION="${ARGUMENT#*=}"
export LOCATION
@@ -1218,37 +1223,40 @@ setup_unionfs ()
# Looking for "${root_persistence}" device or file
if [ -n "${PERSISTENT}" ] && [ -z "${NOPERSISTENT}" ]
then
- # Load USB modules
- num_block=$(ls -l /sys/block | wc -l)
- for module in sd_mod uhci-hcd ehci-hcd ohci-hcd usb-storage
- do
- modprobe -q -b ${module}
- done
-
- if [ -x /sbin/udevadm ]
+ if [ -z "${QUICKUSBMODULES}" ]
then
- # lenny
- udevadm trigger
- udevadm settle
- else
- # etch
- udevtrigger
- udevsettle
- fi
-
- # For some reason, udevsettle does not block in this scenario,
- # so we sleep for a little while.
- #
- # See https://bugs.launchpad.net/ubuntu/+source/casper/+bug/84591
- for timeout in 5 4 3 2 1
- do
- sleep 1
+ # Load USB modules
+ num_block=$(ls -l /sys/block | wc -l)
+ for module in sd_mod uhci-hcd ehci-hcd ohci-hcd usb-storage
+ do
+ modprobe -q -b ${module}
+ done
- if [ $(ls -l /sys/block | wc -l) -gt ${num_block} ]
+ if [ -x /sbin/udevadm ]
then
- break
+ # lenny
+ udevadm trigger
+ udevadm settle
+ else
+ # etch
+ udevtrigger
+ udevsettle
fi
- done
+
+ # For some reason, udevsettle does not block in this scenario,
+ # so we sleep for a little while.
+ #
+ # See https://bugs.launchpad.net/ubuntu/+source/casper/+bug/84591
+ for timeout in 5 4 3 2 1
+ do
+ sleep 1
+
+ if [ $(ls -l /sys/block | wc -l) -gt ${num_block} ]
+ then
+ break
+ fi
+ done
+ fi
# search for label and files (this could be hugely optimized)
cowprobe=$(find_cow_device "${root_persistence}")