From d27400ce146c5e3a340eec8f614012ced2ddc29b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 22 Dec 2007 10:23:50 +0100 Subject: [PATCH] Merging casper 1.113. --- debian/init | 3 +++ docs/ChangeLog.casper | 15 +++++++++++ scripts/live-bottom/10adduser | 2 +- scripts/live-bottom/43disable_updateinitramfs | 36 +++++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100755 scripts/live-bottom/43disable_updateinitramfs diff --git a/debian/init b/debian/init index d59ed45..149314b 100644 --- a/debian/init +++ b/debian/init @@ -24,6 +24,9 @@ DO_SNAPSHOT=/sbin/live-snapshot # Exit if system was not booted by live-initramfs grep -qs boot=live /proc/cmdline || exit 0 +# Exit if the system was booted from an ISO image rather than a physical CD +grep -qs find_iso= /proc/cmdline && exit 0 + # Read configuration variable file if it is present [ -r /etc/live.conf ] && . /etc/live.conf diff --git a/docs/ChangeLog.casper b/docs/ChangeLog.casper index 9b578ef..9b80ec8 100644 --- a/docs/ChangeLog.casper +++ b/docs/ChangeLog.casper @@ -1,3 +1,18 @@ +casper (1.113) hardy; urgency=low + + [ Tollef Fog Heen ] + * dpkg-divert away update-initramfs as it's useless on live CDs and + annoying when people install LVM and similar tools in order to rescue + a system. LP: #150188 + + [ Colin Watson ] + * Adjust /etc/sudoers editing code so that it doesn't repeatedly add + "NOPASSWD:" in persistent mode (LP: #175159). + * Avoid ejecting the CD if booting from an ISO image rather than from a + physical CD (thanks, Agostino Russo; LP: #176014). + + -- Colin Watson Wed, 19 Dec 2007 09:17:50 +0000 + casper (1.112) hardy; urgency=low * hooks/casper: no need to copy udevinfo into the initramfs, it's already diff --git a/scripts/live-bottom/10adduser b/scripts/live-bottom/10adduser index e5067dd..1a80e26 100755 --- a/scripts/live-bottom/10adduser +++ b/scripts/live-bottom/10adduser @@ -59,7 +59,7 @@ EOF if [ -z "${NOSUDO}" ] then - if [ -f /root/etc/sudoers ] + if ! grep -q "${USERNAME}" /root/etc/sudoers then echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /root/etc/sudoers diff --git a/scripts/live-bottom/43disable_updateinitramfs b/scripts/live-bottom/43disable_updateinitramfs new file mode 100755 index 0000000..095bf74 --- /dev/null +++ b/scripts/live-bottom/43disable_updateinitramfs @@ -0,0 +1,36 @@ +#!/bin/sh +# Fix for LP#150188 + +PREREQ="" +DESCRIPTION="Disabling update-initramfs (useless on a live CD)..." + +. /scripts/casper-functions + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +log_begin_msg "$DESCRIPTION" + +chroot /root dpkg-divert --add --rename --quiet \ + /usr/sbin/update-initramfs +cat > /root/usr/sbin/update-initramfs <