[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: check mount



On Tue, Jul 16, 2013 at 09:32:45PM CEST, Pol Hallen <deben@fuckaround.org> said:
> Hi all :-)
> 
> mount -t cifs //server/share /local -o [...]
> 
> I do this mount via vpn (over internet), How I check if this mount point
> is active? If there's a alive connection?
> 
> Because (by cron) I run some scripts to do operations.
> 
> PS: If internet connection goes down, this mount point will not be
> alive. How I check it?
> 
> thanks!
> 
> Pol

the mountpoint command will tell you wether a specific directory is a mountpoint or not.

I use it to check that an encrypted disk is mounted before starting
programs which need data on this partition.

if mountpoint -q $SECURE_MOUNTPOINT ;then 
   exec $PROGRAM
fi



Reply to: