[Samba] Bash/perl: how to know if a samba directory is mounted?

Rory Vieira rory.vieira at gmail.com
Wed Sep 6 09:43:00 GMT 2006


Luca,

On 9/6/06, Luca Manganelli <luca76 at gmail.com> wrote:
> Hi,
>
> I am writing an Perl application that automatically mounts a samba directory.
>
> But I would like to know if that directory is already mounted by samba
> (i.e. in multiple logins, that directory could be mounted only on the
> first login) ?
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/listinfo/samba
>

why not:
MOUNTED=`mount|grep <mounted_directory>`
if [ ! -n $MOUNTED ]; then
    mount <yur_dir>
fi

Cheers,
-- 
Rory Vieira
rory dot vieira at gmail dot com


More information about the samba mailing list