Handling failed mount (media not connected)
L Goodwin
xrayv19 at yahoo.com
Mon Sep 3 20:30:48 PDT 2007
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/
More information about the freebsd-questions
mailing list