[syslinux] (no subject)

Giulio Orsero giulioo at pobox.com
Sun Jan 27 03:35:35 PST 2002


On Sun, 27 Jan 2002 19:21:03 GMT, Bruce M Beach <brucemartinbeach at 21cn.com>
wrote:

>      to do is somehow automatically determine what drive the cd 
>      is on so I can mount it with out a command line prompt.
>      This would be quite useful since I would like the students
>      to be able walk up to any WindToad(TM) system in the University, 

assuming kernel >= 2.2
set up fstab to use /dev/cdrom as device, then

    cddev=
    for i in hda hdb hdc hdd
    do
        if [ -f /proc/ide/$i/media ]; then
            media=`cat /proc/ide/$i/media`
            if [ "$media" = "cdrom" ]; then
                cddev=/dev/$i
                break
            fi
        fi
    done
 
    if [ -n "$cddev" ]; then
        ln -s -f $cddev /dev/cdrom
    fi


-- 
giulioo at pobox.com



More information about the Syslinux mailing list