On Tue, 13 Mar 2018 14:49:56 +0100
<to...@tuxteam.de> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Tue, Mar 13, 2018 at 10:33:43PM +0900, Mark Fletcher wrote:

> > >   
> > Unless I've misunderstood the question, you can tell if something
> > is mounted at a mount point by checking if anything is present
> > under the mount point [...]  
> 
> Not if the file system is really empty (and no, lost+found doesn't
> really count, since not all file systems have that).
> 

But one use-case is unattended synchronisation, possibly over a network.
If the directory is mounted, but with some kind of problem, then a check
for mounting could succeed without any data being visible to the
synchronising application. In the worst case, the backup directory
might be synchronised to an apparently empty one....

I prefer to test for the existence of a known lower directory in this
case, which tests not only for mounting but for a successful read.

-- 
Joe

Reply via email to