Date: Tue, 4 Sep 2007 14:09:45 -0700 (PDT) From: L Goodwin <xrayv19@yahoo.com> To: Robert Huff <roberthuff@rcn.com> Cc: freebsd-questions@freebsd.org Subject: Re: Handling failed mount (media not connected) Message-ID: <403447.52821.qm@web58109.mail.re3.yahoo.com> In-Reply-To: <18140.54529.1923.789795@jerusalem.litteratus.org>
index | next in thread | previous in thread | raw e-mail
--- Robert Huff <roberthuff@rcn.com> wrote:
> L Goodwin writes:
>
> > My backup script (sh) works fine except when the
> > backup drive (USB Flash drive) is not plugged in.
> I'm
> > using mount_msdosfs to mount the backup drive.
> >
> > What is the best way to handle mount_msdosfs
> error?
> > If the drive is not mounted, I want to detect the
> > failure and execute error-handling code.
>
> First approximation, using sh:
>
> ls /dev | grep da4s1
> if [ $? -eq 0 ];
> then
> # drive is available
>
> else
> # drive is not available
>
> if
>
> (Replace "da4s1" with whatever the flash drive gets
> created
> as.)
Oh, yeah. Thanks, Robert!
Now, sendmail has stopped working again (was working
last night). Now, sendmail thinks on it for awhile,
then returns 0, but mailq returns "/var/spool/mqueue
is empty Total requests: 0"
I was testing outgoing email by disconnecting the
network cable. Now, nothing (also tried with it
connected).
>
>
> Robert Huff
>
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?403447.52821.qm>
