#! /bin/sh #---------------------------------------------------------------------------- # system-devices-mount-cdrom - mount CDROM # # Copyright (c) 2003 Frank Meyer # # Creation: 19.07.2003 fm # Last Update: 19.07.2003 fm # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- echo mountpath=/cdrom if [ ! -e /dev/cdrom ] then cdrom='' for j in hda hdb hdc hdd do eval $j=`cat /proc/ide/$j/media 2>/dev/null` eval type='$'$j if [ "$type" = cdrom ] then cdrom=$j break fi done if [ "$cdrom" != "" ] then pwd=`pwd` cd /dev ln -sf $cdrom cdrom cd $pwd fi fi if [ -e /dev/cdrom ] then mount -r -t iso9660 /dev/cdrom $mountpath if [ $? = 0 ] then echo "mount successful, path is $mountpath" else echo "mount failed." fi else echo "no /dev/cdrom found" fi echo /var/install/bin/anykey exit 0