chiark / gitweb /
[PATCH] add install and uninstall the etc/dev.d/net/hotplug.dev file to the Makefile
[elogind.git] / extras / ide-devfs.sh
index e5bf177f8b2909fb8a95c1418965b340d5d98f8d..22d09d7a5ac0efc8768504b9b874325c8d4f05db 100644 (file)
@@ -35,7 +35,7 @@ get_dev_number() {
        echo $((${num} - 1))
 }
 
-if [ -z "$3" ]; then
+if [ -z "$3" -a -f /proc/ide/${1}/media ]; then
        MEDIA=`cat /proc/ide/${1}/media`
        if [ "${MEDIA}" = "cdrom" ]; then
                echo ide/host${HOST}/bus${BUS}/target${TARGET}/lun0/cd cdroms/cdrom`get_dev_number $1 cdrom`