Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Sep 2007 20:30:46 -0700 (PDT)
From:      L Goodwin <xrayv19@yahoo.com>
To:        freebsd-questions@freebsd.org
Subject:   Handling failed mount (media not connected)
Message-ID:  <813384.83992.qm@web58102.mail.re3.yahoo.com>

next in thread | raw e-mail | index | archive | help
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.

I tried executing it in a subshell, which works when
it FAILS, but not when it WORKS.
Also tried trap <mount command> 0, but it did not help.


       
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?813384.83992.qm>