From c2818554cee064360b8a3ed543fe30349096a74a Mon Sep 17 00:00:00 2001 From: "md@Linux.IT" Date: Sat, 27 Mar 2004 01:21:41 -0800 Subject: [PATCH] [PATCH] small ide-devfs.sh fix The file may not exist and errors would be spewed on the console. --- extras/ide-devfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/ide-devfs.sh b/extras/ide-devfs.sh index e5bf177f8..22d09d7a5 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` -- 2.30.2