openrc-discuss

Re: /etc/rc.conf and dependencies

Roy Marples

Sat Feb 20 21:50:44 2010

On Thursday 18 February 2010 00:05:47 Trevor Smith wrote:
> Hello,
> 
> I am looking into Gentoo bug
> (http://bugs.gentoo.org/show_bug.cgi?id=294471) and decided to test
> out adding 'need' dependencies on a per-service basis to /etc/rc.conf.
> As far as I can tell, the way of specifying these rules as documented
> in the man 8 runscript page, and the /etc/rc.conf file does _not_
> work. Specifically, I have tried adding:
> 
> rc_${RC_SVCNAME}_need="FOO"
> 
> without any luck. The /etc/conf.d/$RC_SVCNAME} files _do_ work as expected.
> 
> Steps to reproduce (an example):
> 
> 1) Comment out 'need net' from /etc/init.d/sshd
> 2) Add 'rc_sshd_need="net"' to /etc/rc.conf
> 3) Restart your net script: sudo /etc/init.d/net restart
> 
> Sshd is not restarted. Furthermore /lib/rc/bin/rc-depend does not
> return any "net" services (but does when net is added to either the
> init scripts or /etc/conf.d/ files).
> 
> I am happy to dig around in the code / send along more information,
> but wanted to make sure this is an issue before doing too much
> digging.

Fixed here
http://roy.marples.name/projects/openrc/changeset/5c52e5beb588d87b1e267d0485b56a2609b5481f

Thanks

Roy

References:
/etc/rc.conf and dependenciesTrevor Smith
Archive administrator: postmaster@marples.name