Merging casper 1.113.
authorDaniel Baumann <daniel@debian.org>
Sat, 22 Dec 2007 09:23:50 +0000 (10:23 +0100)
committerDaniel Baumann <daniel@debian.org>
Wed, 9 Mar 2011 16:31:06 +0000 (17:31 +0100)
debian/init
docs/ChangeLog.casper
scripts/live-bottom/10adduser
scripts/live-bottom/43disable_updateinitramfs [new file with mode: 0755]

index d59ed45..149314b 100644 (file)
@@ -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
 
index 9b578ef..9b80ec8 100644 (file)
@@ -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 <cjwatson@ubuntu.com>  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
index e5067dd..1a80e26 100755 (executable)
@@ -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 (executable)
index 0000000..095bf74
--- /dev/null
@@ -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 <<EOF
+#! /bin/sh
+
+echo "update-initramfs is disabled since running on a live CD"
+exit 0
+
+EOF
+
+chmod 755 /root/usr/sbin/update-initramfs
+
+log_end_msg