trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: April 2015

Re: [trinity-users] shell script help needed

From: Nick Koretsky <nick_koretsky@...>
Date: Mon, 6 Apr 2015 23:44:27 +0300
On Sun, 5 Apr 2015 16:37:42 -0500
multi <multi@...> wrote:

> I'm using Trinity 3.5.13.2 that was installed with exe GNU linux.
> 
> I have a bash script to mount a shared folder from a remote server and
> open it in a window. I launch it from a desktop icon. It looks like this:
> 
>   sudo mount 192.168.0.2:/home/dpjungk/Share /mnt/nfs/client1
>   nautilus /mnt/nfs/client1
> 
> It works fine -- except that, if I close the window and want to reopen
> it, it obviously asks for the password every time.
> 
> Is there a way to check to see if it is mounted so that it only asks for
> the password if it is the first time?
> 

You already received a lot of replies about how to check if its mounted,
but i think the better way would be to either put a relevant line in fstab
with a user flag so you can avoid sudo or (even better) set up an
automounter (i use autofs, but there are others).

-- 
  Nick Koretsky (nick.koretsky@...)