Following the suggestions that were posted, I now have a working 
script that checks for a connection to the DVD-RAM drive. The 
following works, but returns the 'Device not configured' error 
if there's no disk in the drive.

        elif !(sudo mount -t ufs -o rw /dev/cd0a $montering_punkt)
        then

Currently, I'm suppressing the error message (2>/dev/null), but I'd 
rather capture sterr in a variable and replace it with a custom 
message if the error is 'Device not configured'. (The devise is 
configured, but I forgot to put a disk in the drive, so the system 
error message is confusing.) I've tried read and redirection, but I 
can't seem to capture the error message in a variable. Does 
anyone know how to do this?

Bob Hall

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to