On Thu, Nov 21, 2002 at 10:41:13AM +0100, Roman Neuhauser wrote:
> MSG=$(sudo mount ... 2>&1)
> if [ $? -ne 0 -a $MSG == "Device not configured" ]; then
> echo "My custom error message"
> fi
Thanks. The one thing I never thought to try was putting '2>&1'
*inside* the parenthes
# [EMAIL PROTECTED] / 2002-11-21 02:17:13 -0500:
> 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.
>
> eli
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)