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,10 +124,12 @@ run_hook ()
# Bind our bootmnt dir into the live system
_mnt_bind /bootmnt /bootmnt
if [ "${FSTYPE}" = "iso9660" -o "${FSTYPE}" = "udf" ]; then
if [ -d /proc/sys/dev/cdrom ]; then
echo 0 > /proc/sys/dev/cdrom/lock
echo 0 > /proc/sys/dev/cdrom/autoeject
fi
fi
if [ "${break}" = "y" ]; then
echo ":: Break requested, type 'exit' to resume operation"