Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 351518 - rc_ntp-client_need="net.eth0" in /etc/rc.conf does not work properly
Summary: rc_ntp-client_need="net.eth0" in /etc/rc.conf does not work properly
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-13 08:54 UTC by Alexey Sychev
Modified: 2011-01-13 19:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Sychev 2011-01-13 08:54:09 UTC
I need that my ntp-client start only after net.eth0.
I can add "need net.eth0" in /etc/init.d/ntp-client, but it not good idea to change this scripts, best way - edit /etc/rc.conf. But, construction like "rc_ntp-client_need="net.eth0" does not work properly.

Reproducible: Always

Steps to Reproduce:
1. echo "rc_ntp-client_need=\"net.eth0\"" >> /etc/rc.conf
2. rc-service start ntp-client

Actual Results:  
gentoo etc # rc-service ntp-client restart
 * Caching service dependencies ...
/etc/rc.conf: line 144: rc_ntp-client_need=net.eth0: command not found
/etc/rc.conf: line 144: rc_ntp-client_need=net.eth0: command not found
/etc/rc.conf: line 144: rc_ntp-client_need=net.eth0: command not found
/etc/rc.conf: line 144: rc_ntp-client_need=net.eth0: command not found
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-01-13 09:28:49 UTC
Dunno if this is really a bug as you can achieve the same result when you add the following line to the file /etc/conf.d/ntp-client:

  rc_need="net.eth0"
Comment 2 William Hubbs gentoo-dev 2011-01-13 19:41:10 UTC
(In reply to comment #1)
> Dunno if this is really a bug as you can achieve the same result when you add
> the following line to the file /etc/conf.d/ntp-client:
>   rc_need="net.eth0"

That is correct, the method above is the preferred way to do this. However, it is also possible to add a line to rc.conf to make this work. To do this, you must use an underscores instead of dashes., so the line you would add to rc.conf looks like:

rc_ntp_client_need="net.eth0"