On 20120720_122714, Rob Owens wrote: > 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
The main message is in the Subject: Your suggestion of .backupdrive1 solves the problem of identity of the disk which I agree is important and which I had already solved in a way that I didn't mention: wdp8 is the LABEL of the partition to be mounted. Giving the partition a LABEL allows some magic in Gnome, or in the system but invoked by Gnome, to mount the disk automatically. I like this, but after about a year of operation, once, about 5d ago, the disk was plugged in but not mounted. -- Paul E Condon pecon...@mesanetworks.net -- 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/20120720185428.gb2...@big.lan.gnu