From 1fc3a61b75f4c4e49ccc4de0399b4f3e6823ad61 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Thu, 8 Jul 2010 03:33:40 -0300 Subject: archiso hook: umount /bootmnt if copytoram=y More generic way than current method, and fix if logic (inverted). Takes the same actions independent of medium (disk/cdrom). Signed-off-by: Gerardo Exequiel Pozzi --- archiso/hooks/archiso | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'archiso/hooks') diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso index ae98231..c7a6829 100644 --- a/archiso/hooks/archiso +++ b/archiso/hooks/archiso @@ -141,16 +141,10 @@ archiso_mount_handler() { fi done < "${isomounts}" - # Bind our bootmnt dir into the live system - _mnt_bind /bootmnt "${newroot}/bootmnt" - - if [ "${copytoram}" != "y" ]; then - if [ "${FSTYPE}" = "iso9660" ] || [ "${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 [ "${copytoram}" = "y" ]; then + /bin/umount /bootmnt + else + _mnt_bind /bootmnt "${newroot}/bootmnt" fi } -- cgit v1.2.3-54-g00ecf