On 05/24/2019 07:44 AM, Barry Roberts wrote:
> I don't un-dock my laptop at work much, it's practically just a
> desktop.  But when I do, it would be nice if the cifs-mounted shares I
> normally use would handle the switch between wired and wifi better.
> Some wifi networks at work allow me to access to some of the cifs
> servers, some don't.  And none of them are available at home unless I
> connect to the VPN.  It would be nice if there was an automounter that
> just handled all that for me.  It's annoying to accidentally hit tab
> and have a bash prompt hang for minutes because I forgot I can't use
> that mount from here.
> 
> I'm old-school, so I'm still using /etc/fstab, but I would switch to
> autofs or systemd if they automatically and gracefully handled
> switching networks.  It seems to me systemd doesn't do that, but I
> can't decide about autofs. It's lazy mount and auto-unmount might give
> me similar results. But I wondered if I'm just missing some docs., orr
> if there are some cool nm event scripts already around to un-mount and
> remount network shares when the network changes.

I know you can write custom scripts that run when an interface goes up
or down.  That might partially help.  But the interface won't know
whether or not the share is available on that particular wifi network.
I suppose the script could check to see what SSID it's attached to and
decide whether the share is accessible or not.  Might work anyway.

What distro are you on?  What VPN system?  Does it support running
scripts after connecting?

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to