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
if [ -x /usr/bin/eject ]
then
eject -p -m /live/image >/dev/null 2>&1
+
+ [ "$prompt" ] || return 0
fi
stty sane < /dev/console
+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,
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.
# 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;
}