View previous topic :: View next topic |
Author |
Message |
padde n00b
Joined: 19 Jan 2005 Posts: 54 Location: Germany
|
Posted: Mon May 28, 2007 7:54 am Post subject: Auto(re)starting network dependant services |
|
|
Hi there,
this is something that bugs me for quite some time, I hope anybody here can clear that up
In Gentoo we have those wonderful init scripts with dependencies. For example sshd depends on net, dnsmasq depends on net, and so on.
Now, the problem I'm having is the following: If an interface goes down (for example I stop net.wlan because I go out of range with my laptop), or isn't being started at all (because the wireless network is not in range while i boot my laptop), those services depending on net won't be started, if I start up net.wlan later on.
What I would like (and I'm sure it's possible somehow, I just don't see it...), are some kind of reverse dependencies that say: If the net is up (no matter which interface, net.lan or net.wlan), also take care that the services depending on it (dnsmasq, sshd, pure-ftpd, ...) are started.
That's it... quite simple, but I don't get how to accomplish it
Cheers,
Padde. |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Mon May 28, 2007 8:03 am Post subject: |
|
|
Put in /etc/conf.d/rc
Code: | RC_NET_STRICT_CHECKING="no" |
Quote: | # no - This basically means that at least one net.* service besides net.lo
# must be up. This can be used by notebook users that have a wifi and
# a static nic, and only wants one up at any given time to have the
# 'net' service seen as up. |
|
|
Back to top |
|
|
padde n00b
Joined: 19 Jan 2005 Posts: 54 Location: Germany
|
Posted: Mon May 28, 2007 8:14 am Post subject: |
|
|
PaulBredbury wrote: | Put in /etc/conf.d/rc
Code: | RC_NET_STRICT_CHECKING="no" |
|
This doesn't solve the problem. In fact I have set this already. If I would set it to "lo" or "none", I would have my network dependant services always running. But that means also when they are not needed. |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Mon May 28, 2007 8:26 am Post subject: |
|
|
/sbin/rc might be what you want. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|