summaryrefslogtreecommitdiff
path: root/scripts/live-bottom/43disable_updateinitramfs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-05-01 14:11:13 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:48:09 +0100
commitef95487ad06d43885cf8c22ee34156cddc753bd4 (patch)
tree276ca703024e7b43d18883cb6abcaf313dd23a80 /scripts/live-bottom/43disable_updateinitramfs
parent613393eef8be213c8859b2d7a2f6334cb82bd52b (diff)
downloadlive-boot-ef95487ad06d43885cf8c22ee34156cddc753bd4.tar.gz
live-boot-ef95487ad06d43885cf8c22ee34156cddc753bd4.zip
Merging casper 1.230.
Diffstat (limited to 'scripts/live-bottom/43disable_updateinitramfs')
-rwxr-xr-xscripts/live-bottom/43disable_updateinitramfs17
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/live-bottom/43disable_updateinitramfs b/scripts/live-bottom/43disable_updateinitramfs
index 0a6c7c0..44e2d1f 100755
--- a/scripts/live-bottom/43disable_updateinitramfs
+++ b/scripts/live-bottom/43disable_updateinitramfs
@@ -38,9 +38,22 @@ then
cat > /root/usr/sbin/update-initramfs << 'EOF'
#!/bin/sh
+set -e
+
update-initramfs.distrib "$@"
-cp /initrd.img /cdrom/live/initrd.gz
-cp /vmlinuz /cdrom/live/vmlinuz
+
+if [ -e /cdrom/live/initrd.lz ]
+then
+ zcat /initrd.img | lzma -9c >/cdrom/live/initrd.lz.new
+ mv /cdrom/live/initrd.lz.new /cdrom/live/initrd.lz
+else
+ cp /initrd.img /cdrom/live/initrd.gz.new
+ mv /cdrom/live/initrd.gz.new /cdrom/live/initrd.gz
+fi
+
+cp /vmlinuz /cdrom/live/vmlinuz.new
+mv /cdrom/live/vmlinuz.new /cdrom/live/vmlinuz
+
exit 0
EOF