3 # udev external PROGRAM script
4 # return devfs-names for ide-devices
5 # BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%c{1} %c{2}", GROUP="%c{3}"
10 if [ -z "${HOST#[13579]}" ]; then
21 for x in /proc/ide/*/media; do
22 if [ -e "${x}" ]; then
24 if [ "${lMEDIA}" = "$2" ]; then
27 if [ "${x}" = "/proc/ide/${DRIVE}/media" ]; then
36 if [ -z "$3" ] && [ -f /proc/ide/${1}/media ]; then
37 MEDIA=`cat /proc/ide/${1}/media`
38 if [ "${MEDIA}" = "cdrom" ]; then
39 echo ide/host${HOST}/bus${BUS}/target${TARGET}/lun0/cd cdroms/cdrom`get_dev_number $1 cdrom` ${MEDIA}
40 elif [ "${MEDIA}" = "floppy" ]; then
41 echo ide/host${HOST}/bus${BUS}/target${TARGET}/lun0/disc floppies/floppy`get_dev_number $1 floppy`/disc ${MEDIA}
42 elif [ "${MEDIA}" = "disk" ]; then
43 echo ide/host${HOST}/bus${BUS}/target${TARGET}/lun0/disc discs/disc`get_dev_number $1 disk`/disc ${MEDIA}
46 echo ide/host${HOST}/bus${BUS}/target${TARGET}/lun0/part$3 discs/disc`get_dev_number $1 disk`/part$3