Merging casper 1.109.
authorDaniel Baumann <daniel@debian.org>
Mon, 8 Oct 2007 22:33:04 +0000 (00:33 +0200)
committerDaniel Baumann <daniel@debian.org>
Wed, 9 Mar 2011 16:31:05 +0000 (17:31 +0100)
debian/init
docs/ChangeLog.casper
manpages/live-initramfs.en.7.txt
scripts/live-premount/10driver_updates

index a24fe9f..d59ed45 100644 (file)
@@ -68,7 +68,12 @@ do_stop ()
         return 0
     fi
 
-    for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default; do
+    prompt=1
+    if grep -qs noprompt /proc/cmdline; then
+       prompt=
+    fi
+
+    for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default $(which stty); do
         cache_path "${path}"
     done
 
@@ -84,6 +89,8 @@ do_stop ()
        if [ -x /usr/bin/eject ]
        then
                eject -p -m /live/image >/dev/null 2>&1
+
+               [ "$prompt" ] || return 0
        fi
 
        stty sane < /dev/console
index bfd3c50..4832706 100644 (file)
@@ -1,3 +1,13 @@
+casper (1.109) gutsy; urgency=low
+
+  * Cache the stty binary before ejecting the CD.
+  * Skip the CD eject prompt if 'noprompt' is on the kernel command line
+    (LP: #149159).
+  * Try each of (e.g.) 2.6.22-13-generic, 2.6.22-13, and 2.6.22 in turn as
+    directory names for driver updates (LP: #122430).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 05 Oct 2007 03:24:43 +0100
+
 casper (1.108) gutsy; urgency=low
 
   * If CASPER_GENERATE_UUID is set, generate a random UUID in the initramfs,
index 5bc0adf..0b1a4bf 100644 (file)
@@ -175,6 +175,10 @@ be checked at boot time, use this parameter, otherwise they are skipped.
 disables the "persistent" feature, useful if the bootloader (like syslinux) has
 been installed with persistent enabled.
 
+  noprompt
+
+Do not prompt to eject the CD on reboot.
+
   nosudo::
 
 This parameter disables the automatic configuration of sudo.
index 22d64d2..3ad9ef6 100755 (executable)
@@ -41,18 +41,19 @@ is_updates_path ()
        # kernel flavour.
 
        path=${1}
-       kbase=$(uname -r | sed 's/^\([0-9]*\.[0-9]*\.[0-9]*\)-.*/\1/')
-       update_dir="${path}/ubuntu-drivers/${kbase}"
-
-       if [ -d "${update_dir}" ]
-       then
+        abi="$(uname -r)"
+        kver="$(echo "$abi" | cut -d- -f1,2)"
+        kbase="$(echo "$abi" | cut -d- -f1)"
+        for leaf in "$abi" "$kver" "$kbase"; do
+                update_dir="$path/ubuntu-drivers/$leaf"
+                [ -d "$update_dir" ] || continue
                if [ "$(echo ${update_dir}/*_${DPKG_ARCH}.deb)" != \
                        "${update_dir}/*_${DPKG_ARCH}.deb" ]
                then
                        echo "${update_dir}"
-                       return 0;
+                       return 0
                fi
-       fi
+       done
 
        return 1;
 }