From: md@Linux.IT Date: Sat, 27 Mar 2004 09:21:41 +0000 (-0800) Subject: [PATCH] small ide-devfs.sh fix X-Git-Tag: 024~41 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2818554cee064360b8a3ed543fe30349096a74a;p=systemd [PATCH] small ide-devfs.sh fix The file may not exist and errors would be spewed on the console. --- diff --git a/extras/ide-devfs.sh b/extras/ide-devfs.sh index e5bf177f..22d09d7a 100644 --- a/extras/ide-devfs.sh +++ b/extras/ide-devfs.sh @@ -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`