Removing locales bottom script, now handled by live-config.
[live-boot-grml.git] / scripts / live-bottom / 41apt_cdrom
index bbfa845..1a36e7f 100755 (executable)
@@ -18,17 +18,30 @@ case "${1}" in
                ;;
 esac
 
-# live-initramfs header
+# live-boot 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-boot script
+
+if [ -d /root/cdrom ]
+then
+       mount -n -o bind /sys /root/sys
+       mount -n -o bind /proc /root/proc
+       mount -n -o bind /dev /root/dev
 
-# live-initramfs script
+       chroot /root apt-cdrom -o Acquire::cdrom::AutoDetect=false -m add
 
-mkdir -p /root/cdrom
-mount -n -o bind /cdrom /root/cdrom
-chroot /root apt-cdrom -m add
-umount /root/cdrom
+       umount /root/dev
+       umount /root/proc
+       umount /root/sys
+fi
 
 log_end_msg