Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   Elegant solution for network-dependent cifs/smb mounting? (http://www.linux-archive.org/debian-user/708086-elegant-solution-network-dependent-cifs-smb-mounting.html)

Johannes Graumann 09-28-2012 11:45 AM

Elegant solution for network-dependent cifs/smb mounting?
 
Hi,

I am looking for a debian- (and optimally kde-) compatible solution that
would allow me to mount cifs/smb network drives ONLY if on the network where
they are expected to exist.

I there was a solution that would upon attempted access to adrive
a) check whether on the right network
b) check whether the corresponding server is up
c) if not b) was able to WakeOnLan the server - and wait for/monitor its
sucessful boot
d) mount the drive

That would be the perfect solution ...

Thanks for any pointers.

Sincerely, Joh



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/k442im$nbk$1@ger.gmane.org

Darac Marjal 09-28-2012 12:10 PM

Elegant solution for network-dependent cifs/smb mounting?
 
On Fri, Sep 28, 2012 at 02:45:26PM +0300, Johannes Graumann wrote:
> Hi,
>
> I am looking for a debian- (and optimally kde-) compatible solution that
> would allow me to mount cifs/smb network drives ONLY if on the network where
> they are expected to exist.
>
> I there was a solution that would upon attempted access to adrive
> a) check whether on the right network
> b) check whether the corresponding server is up
> c) if not b) was able to WakeOnLan the server - and wait for/monitor its
> sucessful boot
> d) mount the drive
>
> That would be the perfect solution ...

Perhaps have a look at whereami. That is a set of scripts that fire when
you connect to a network. It can identify which network you're on (for
example, you got a DHCP response and it was in the range x.x.x.x to
x.x.x.y). I'm fairly certain there are tests for "can I reach server
Foo?", and it wouldn't be too hard to add "can I etherwake server Foo?".


All times are GMT. The time now is 06:50 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.