[linux-elitists] Per-user network up and down scripts

Don Marti dmarti@zgp.org
Wed Nov 26 08:40:10 PST 2008

I'm slowly populating my laptop's /etc/network/*.d
directories with scripts to do the right things
when I connect or disconnect.  (Just submitted these
as a wishlist item for the Debian wwwoffle package,
for example.)

There's other stuff that I want to do when the net
comes up or down that should run as me, not root.
(Sync my IMAP mail, open ssh "master" connections
which are tied to me, and so on.)

Sure, I could put the scripts in /etc/network/*.d and
have them su to me, but I don't want to mess up /etc
with stuff that runs as me.  What about having an


script, which would go through the members of a
certain group, and if one of those users were logged
in, see if that user has a $HOME/.network/if-up.d
directory, and if so, run-parts everything in it?

Has someone come up with a standard place for users
to put things that they want to have happen when the
network connection changes?

Don Marti                                        +1 510-814-0932
http://zgp.org/~dmarti/                          +1 510-332-1587 mobile

More information about the linux-elitists mailing list