PDA

View Full Version : [all variants] Shared drive script: mount then open or just open if already mounted



bailes77
May 3rd, 2009, 05:44 PM
I am not familiar with bash scripts, and would like to write a script that I can link a desktop launcher to. The script when executed would open the shared drive in nautilus if it is already mounted, however, if not mounted it would first mount it then open it in nautilus, otherwise, if it cannot be mounted display an appropriate error message.

The shared drive is a Samba share on a laptop that often goes into standby (which is desired), so it is often that it is unmounted.

Another question, is it possible in Ubuntu to somehow have it regularly check to see if a mount location is available, and if so mount it.

Brad