X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive;h=cdcbc18ad85265fddcb7eeedd22d1fe4d86b9b24;hb=73721cf99b1c95a7478c98c86716daf4259d16de;hp=3ef4ef04c6dd0b57368ccb86a05caafc7d78921b;hpb=5c1ee9f9c3a9c3ae4636533ca72f05649ad4b178;p=live-boot-grml.git diff --git a/scripts/live b/scripts/live index 3ef4ef0..cdcbc18 100755 --- a/scripts/live +++ b/scripts/live @@ -667,7 +667,7 @@ is_nice_device () { sysfs_path="${1#/sys}" - if /lib/udev/path_id "${sysfs_path}" | grep -E -q "ID_PATH=(usb|pci-|platform-orion-ehci|platform-mmc|platform-mxsdhci|)" + if /lib/udev/path_id "${sysfs_path}" | egrep -q "ID_PATH=(usb|pci-|platform-orion-ehci|platform-mmc|platform-mxsdhci|)" then return 0 elif echo "${sysfs_path}" | grep -q '^/block/vd[a-z]$' @@ -705,7 +705,7 @@ copy_live_to () if [ "${copytodev}" = "ram" ] then # copying to ram: - freespace=$( expr $(awk '/MemFree/{print $2}' /proc/meminfo) + $( awk '/\ /tmp/debconf-out.fifo < /tmp/debconf-in.fifo & + + # Save the PID so it can be killed later. + DEBCONF_COMMUNICATE_PID="$!" + + if [ ! -p /tmp/debconf-in.fifo ] || [ ! -p /tmp/debconf-out.fifo ] + then + log_warning_msg "failed to setup debconf-communicate channel" + fi + log_end_msg + + # Order matters! + # These file descriptors must stay open until we're finished with + # debconf-communicate. + exec 4/tmp/debconf-in.fifo + maybe_break live-bottom log_begin_msg "Running /scripts/live-bottom\n" @@ -1888,6 +1918,11 @@ mountroot () umount "${rootmnt}/dev" fi + # Close the fd's associated with debconf-communicate + exec 3>&- 4<&- + rm -f /tmp/debconf-in.fifo + rm -f /tmp/debconf-out.fifo + exec 1>&6 6>&- exec 2>&7 7>&- kill ${tailpid}