X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Fcasper;h=346a6caf223a11209488699558ff9ba5e8fba831;hb=refs%2Ftags%2Fupstream%2F1.77%2Bdebian;hp=3e7db03b90ef79aeeaf83724beebf6a96f52d4fe;hpb=5d98c0a23826c3ee194980c782ebbb2787df4c68;p=live-boot-grml.git diff --git a/scripts/casper b/scripts/casper index 3e7db03..346a6ca 100644 --- a/scripts/casper +++ b/scripts/casper @@ -91,7 +91,7 @@ setup_loop() { local pattern=$3 modprobe -Qb "$module" - udevplug -W + udevsettle for loopdev in $pattern; do if [ "$(cat $loopdev/size)" -eq 0 ]; then @@ -189,8 +189,12 @@ setup_unionfs() { rootmnt="$2" modprobe -Qb unionfs - croot="" # Should really be /casper, but run-init doesn't handle - # mount-points in subdirectories at all + # run-init can't deal with images in a subdir, but we're going to + # move all of these away before it runs anyway. No, we're not, + # put them in / since move-mounting them into / breaks mono and + # some other apps. + + croot="/" # Let's just mount the read-only file systems first mkdir -p "${croot}" @@ -231,13 +235,12 @@ setup_unionfs() { mount -t unionfs -o dirs=/cow=rw:$rofsstring unionfs "$rootmnt" - for d in $(mount -t squashfs | cut -d\ -f 3); do - mkdir -p "${rootmnt}/casper/${d}" - mount -o bind "${d}" "${rootmnt}/${d}" - umount "${d}" - done + if grep -q showmounts /proc/cmdline; then + for d in $(mount -t squashfs | cut -d\ -f 3); do + mkdir -p "${rootmnt}/casper/${d##*/}" + mount -o move "${d}" "${rootmnt}/casper/${d##*/}" + done - if grep -q show-cow /proc/cmdline; then mkdir -p "$rootmnt/cow" mount -o bind /cow "$rootmnt/cow" fi @@ -246,7 +249,7 @@ setup_unionfs() { is_usb_device() { sysfs_path="${1#/sys}" - if /lib/udev/path_id "${sysfs_path}" | grep -q "ID_PATH=(usb|pci-[^-]*-usb)"; then + if /lib/udev/path_id "${sysfs_path}" | grep -E -q "ID_PATH=(usb|pci-[^-]*-usb)"; then return 0 fi return 1 @@ -294,6 +297,12 @@ find_livefs() { done } +pulsate() { + if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "PULSATE" + fi +} + set_usplash_timeout() { if [ -x /sbin/usplash_write ]; then /sbin/usplash_write "TIMEOUT 120" @@ -308,6 +317,7 @@ mountroot() { set_usplash_timeout [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-premount" + pulsate run_scripts /scripts/casper-premount [ "$quiet" != "y" ] && log_end_msg @@ -333,6 +343,7 @@ mountroot() { maybe_break casper-bottom [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-bottom" + pulsate run_scripts /scripts/casper-bottom [ "$quiet" != "y" ] && log_end_msg