# named must be restarted.. [solved]

## poly_poly-man

Every time I reboot (which is not often, fortunately), because I am the router, dhcp server and DNS server for the network, I set sysctl to automatically put a "1" in /proc/sys/net/ipv4/ip_forward (which works with my bridge),  DHCPD to automatically start, and bind to automatically start (among other things).

Still, every time I reboot, I have to give /etc/init.d/named restart for it to actually work (I also restart samba, but I think that's just paranoia on my part.)

This isn't difficult or anything, but I'd like it to be automatic (so, for example, if a powerout happens when I'm not around, and my UPS dies, my computer will resume its normal duties quickly and efficiently.)

any ideas?

----------

## coolsnowmen

If the ip_forward setting is in a service just make named depend on it. This way the setting happens before named is started.  in openrc this is easy, previously I had to edit the init.d/* file myself.

----------

## poly_poly-man

 *coolsnowmen wrote:*   

> If the ip_forward setting is in a service just make named depend on it. This way the setting happens before named is started.  in openrc this is easy, previously I had to edit the init.d/* file myself.

 I believe sysctl takes care of that (I put the setting in sysctl.conf)...

The weird thing is, my network is set up as a bridge before named comes up, and then when ntp comes up, it fails (because it can't find the name)...

...what exactly is this easy way to do it in openrc?

----------

## coolsnowmen

Hmm, I was was under the [perhaps mistaken] impression that it simply needed to be set before named was started (I don't know when sysctl.conf gets parsed). 

For dependancies, according to /etc/rc.conf (0.4.1), you could put something like this in there:

rc_named_need="myservice"

----------

## poly_poly-man

I rearranged a few services, and it works very well now, thanks!

----------

