Adding upstream version 1.139.1.
[live-boot-grml.git] / scripts / live-bottom / 41apt_cdrom
index bbfa845..00606d5 100755 (executable)
@@ -20,15 +20,20 @@ esac
 
 # live-initramfs header
 
+if [ -n "${NOAPTCDROM}" ]
+then
+       exit 0
+fi
+
 . /scripts/live-functions
 
-log_begin_msg "Adding APT-CDROM source..."
+log_begin_msg "Adding APT-CDROM source"
 
 # live-initramfs script
 
-mkdir -p /root/cdrom
-mount -n -o bind /cdrom /root/cdrom
-chroot /root apt-cdrom -m add
-umount /root/cdrom
+if [ -d /root/cdrom ]
+then
+       chroot /root apt-cdrom -m add
+fi
 
 log_end_msg