Merging casper 1.162.
authorDaniel Baumann <daniel@debian.org>
Mon, 26 Oct 2009 12:28:56 +0000 (13:28 +0100)
committerDaniel Baumann <daniel@debian.org>
Wed, 9 Mar 2011 16:48:06 +0000 (17:48 +0100)
docs/ChangeLog.casper
scripts/live-bottom/43disable_updateinitramfs

index b57c39b..e051d62 100644 (file)
@@ -1,3 +1,10 @@
+casper (1.162) jaunty; urgency=low
+
+  * If /cdrom is writable, call the diverted update-initramfs and copy
+    the resulting kernel and initrd to /cdrom/casper (LP: #292159).
+
+ -- Evan Dandrea <evand@ubuntu.com>  Tue, 10 Mar 2009 14:36:30 +0000
+
 casper (1.161) jaunty; urgency=low
 
   [ Juanje Ojeda ]
index 0a434ed..dab2290 100755 (executable)
@@ -22,20 +22,37 @@ esac
 
 . /scripts/live-functions
 
-log_begin_msg "Disabling update-initramfs"
+log_begin_msg "Possibly disabling update-initramfs (useless on a live CD)..."
 
 # live-initramfs script
 
 chroot /root dpkg-divert --add --rename --quiet \
        /usr/sbin/update-initramfs
 
-cat > /root/usr/sbin/update-initramfs <<EOF
+# Running off a USB disk or other writable media.
+if [ -w /cdrom ]
+then
+
+cat > /root/usr/sbin/update-initramfs << EOF
+#!/bin/sh
+
+update-initramfs.distrib "$@"
+cp /initrd.img /cdrom/live/initrd.gz
+cp /vmlinuz /cdrom/live/vmlinuz
+exit 0
+EOF
+
+else
+
+cat > /root/usr/sbin/update-initramfs << EOF
 #!/bin/sh
 
-echo "update-initramfs is disabled since running on a live CD"
+echo "update-initramfs is disabled since running on read-only media"
 exit 0
 EOF
 
+fi
+
 chmod 0755 /root/usr/sbin/update-initramfs
 
 log_end_msg