Message: previous - next
Month: April 2015

Re: [trinity-users] shell script help needed

From: Tony Rein <trein@...>
Date: Sun, 05 Apr 2015 17:52:50 -0400
On 04/05/2015 05:37 PM, multi wrote:
> Hi,
> I'm using Trinity 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 /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?
> Thank you for your time,
> Don
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: trinity-users-unsubscribe@...
> For additional commands, e-mail: trinity-users-help@...
> Read list messages on the web archive:
> Please remember not to top-post:
How about something like:

if ! ( mount | grep "/mnt/nfs/client1"); then
     echo "not mounted"
     echo "I'm afraid I'm going to have to ask for your password..."