Only lock the optical drive if mounted from this

Check if FSTYPE is iso9660 or UDF, and only in this case look the optical drive.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
Gerardo Exequiel Pozzi 2009-11-17 02:57:51 -03:00
parent ed97ef03a4
commit 38d828f749

View File

@ -124,9 +124,11 @@ run_hook ()
# Bind our bootmnt dir into the live system # Bind our bootmnt dir into the live system
_mnt_bind /bootmnt /bootmnt _mnt_bind /bootmnt /bootmnt
if [ -d /proc/sys/dev/cdrom ]; then if [ "${FSTYPE}" = "iso9660" -o "${FSTYPE}" = "udf" ]; then
echo 0 > /proc/sys/dev/cdrom/lock if [ -d /proc/sys/dev/cdrom ]; then
echo 0 > /proc/sys/dev/cdrom/autoeject echo 0 > /proc/sys/dev/cdrom/lock
echo 0 > /proc/sys/dev/cdrom/autoeject
fi
fi fi
if [ "${break}" = "y" ]; then if [ "${break}" = "y" ]; then