On Thursday 23 May 2002 08:01, you wrote:
> Hello all.
>
> I have a script that could possibly generate the following error:
> "mount: /dev/fd0 is not a valid block device".  I can't quite figure out
> how to get `trap' to catch that or similar errors.  (I'd like to have it
> echo an error message to std out and abort the script.) Am I trying to
> use the wrong tool here?
>

my memory may be playing tricks on me, but I seem to remember
getting around a similar problem by doing something like
        MESSAGE=`mount /dev/fd0 /mnt/floppy 2>&1'
        if [ $? -ne 0 ] ; then 
           echo $MESSAGE
               exit
        fi


-- 
Rob Saul.:|:[EMAIL PROTECTED]:|:.de recta non tolerandum sunt



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to