Hi AlejandroPadrino
This should give you a baseline to get you started:
#!/bin/sh
LABEL="MultiCore"
CDROM=""
for i in `cat /etc/sysconfig/cdroms` # Loop through all the CD drives on the machine
do
CDROM=`blkid $i | grep $LABEL` # Search for the CDs label
if [ -n "$CDROM" ] # was the label found?
then # Yes
i=`echo $i | cut -c5-` # Remove /dev from string
CDROM=/mnt$i # Prefix the string with /mnt
break
else # CD label was not found
CDROM="Not found."
fi
done
echo $CDROM
Since I am not proficient at scripting, this should not be taken as the best way to do this, it does work though.