Re: Need suggestions on a backup issue
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
Reply to: