Merging casper 1.169.
[live-boot-grml.git] / scripts / live-bottom / 43disable_updateinitramfs
index fa0ecac..2b60315 100755 (executable)
@@ -30,7 +30,8 @@ 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 /cdrom ] && \
+   ! grep -q '^[^ ]* /cdrom [^ ]* [^ ]*\<ro\>' /proc/mounts; then
 then
 
 cat > /root/usr/sbin/update-initramfs << 'EOF'