Merging casper 1.217.
[live-boot-grml.git] / scripts / live-bottom / 43disable_updateinitramfs
index dab2290..0a6c7c0 100755 (executable)
@@ -30,10 +30,12 @@ chroot /root dpkg-divert --add --rename --quiet \
        /usr/sbin/update-initramfs
 
 # Running off a USB disk or other writable media.
-if [ -w /cdrom ]
+if [ -w /root/cdrom ] && \
+   # rw is guaranteed to be first.
+   grep -q ' /root/cdrom rw[, ]' /proc/self/mountinfo
 then
 
-cat > /root/usr/sbin/update-initramfs << EOF
+cat > /root/usr/sbin/update-initramfs << 'EOF'
 #!/bin/sh
 
 update-initramfs.distrib "$@"