summaryrefslogtreecommitdiff
path: root/scripts/live-bottom/43disable_updateinitramfs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/live-bottom/43disable_updateinitramfs')
-rwxr-xr-xscripts/live-bottom/43disable_updateinitramfs36
1 files changed, 36 insertions, 0 deletions
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 <<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