From ed30034da733f30616972c83ad94a74ad373ae2a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 18 Apr 2010 20:42:08 +0200 Subject: [PATCH] Adding upstream version 1.173.2. --- scripts/live | 73 ++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 34 deletions(-) diff --git a/scripts/live b/scripts/live index e17f66f..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 @@ -1101,15 +1106,10 @@ setup_unionfs () # Let's just mount the read-only file systems first rofsstring="" rofslist="" - minor_kernel_version=$(uname -r|cut -c 5-|sed 's/[^0-9].*//') - if [ "${NETBOOT}" = "nfs" ] && [ "${minor_kernel_version}" -lt 22 ] + if [ "${UNIONTYPE}" = "aufs" ] then - # go aroung a bug in nfs-unionfs locking for unionfs <= 1.4 - roopt="nfsro" - elif [ "${UNIONTYPE}" = "aufs" ] - then - roopt="rr" + roopt="rr,xino=/tmp/aufs.xino" else roopt="ro" fi @@ -1223,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}") @@ -1515,6 +1518,7 @@ find_livefs () fi fi done + return 1 ;; removable) @@ -1531,6 +1535,7 @@ find_livefs () done fi done + return 1 ;; *) -- 2.1.4