Depends on the kerenl version, but later kernels have the cdrom/dvd under /proc/sys/dev/cdrom, this may not be the case in all kernels, might need to have a look in your /proc directory.
If you cat /proc/sys/dev/cdrom/info, you will get some thing like this:
Quote:
drive name: hdd
drive speed: 48
drive # of slots: 1
Can close tray: 1
Can open tray: 1
Can lock tray: 1
Can change speed: 1
Can select disk: 0
Can read multisession: 1
Can read MCN: 1
Reports media changed: 1
Can play audio: 1
Can write CD-R: 1
Can write CD-RW: 1
Can read DVD: 1
Can write DVD-R: 1
Can write DVD-RAM: 1
Can read MRW: 1
Can write MRW: 1
Can write RAM: 1
|
You could then use something like this:
Quote:
cat /proc/sys/dev/cdrom/info | grep "drive name:" | awk '{print $3}'
|
Then you can add it to a variable of your choice
Quote:
CDROM_DEVICE=/dev/`cat /proc/sys/dev/cdrom/info | grep "drive name:" | awk '{print $3}'`
|
Is this what you are after