Bruce,
I added a just in case feature. What do you think.
KERN_NAME="$1"
if [ "$KERN_NAME" = "" ]; then
mesg Bad invocation: \$1 is not set
exit 1
fi
FILES="`ls /sys/bus/ide/drivers/ide-cdrom | grep '\.' `"
for file in $FILES; do
TEST="`ls /sys/bus/ide/drivers/ide-cdrom/$file | grep -c
$KERN_NAME`"
if [ "$TEST" = "1" ]; then
link="`echo $file | cut -f2 -d.`"
while [ $test -lt 1 ] ; do
if [ -e /dev/cdrom$link ]; then
link=$[$link+1]
else
test=1
fi
done
fi
done
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page