On Fri, Jul 20, 2012 at 09:50:53AM -0600, Paul E Condon wrote:
> 
> Debian already provides an email facility that allows cron scripts to
> email me with error messages. I need a way to test in Bash whether, or
> not, there actually is a disk mounted at /media/wdp8. 
> 
> What test can I code in Bash to determine that there is no disk
> mounted at this mount point? I'm thinking of testing for the
> presence of the file lost+found, but is there something better?
> 
Rather than looking for lost+found (which could be any disk), I'd look
for an identification file that you put on that disk.  For instance,
/media/wdp8/.backupdrive1

I guess you could also grep /etc/mtab for /media/wdp8, but I'm not sure
if that's 100% reliable.

-Rob


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120720162714.gb11...@aurora.owens.net

Reply via email to