openrc-discuss

/etc/rc.conf and dependencies

Trevor Smith

Thu Feb 18 00:05:49 2010

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.

Thanks.

Trevor

Follow-Ups:
Re: /etc/rc.conf and dependenciesRoy Marples
Re: /etc/rc.conf and dependenciesTrevor Smith
Archive administrator: postmaster@marples.name