chrony: S49chrony: support a defaults file
PATCH 1/2 chrony: S49chrony: support a defaults file
For specifying custom options to chrony.
--- package/chrony/S49chrony | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
package/chrony/S49chrony +3 -1
@@ -2,12 +2,14 @@ # # Start chrony +[ -r /etc/default/chrony ] && . /etc/default/chrony + [ -f /etc/chrony.conf ] || exit 0 case "$1" in start) printf "Starting chrony: " - chronyd && echo "OK" || echo "FAIL" + chronyd $CHRONY_ARGS && echo "OK" || echo "FAIL" ;; stop) printf "Stopping chrony: "
Signature · 1 line
2.11.0
PATCH 2/2 chrony: S49chrony: drop /etc/chrony.conf check
With CHRONY_ARGS in /etc/default/chrony, chrony may asked to use an alternative configuration file (with the -f option), so drop the explicit /etc/chrony.conf check.
In case the configuration file isn't present chrony will anyway loudly complain which is preferable to this silent failure:
chronyd -f /non/existing/file.conf
Could not open configuration file /non/existing/file.conf : No such file or directory
--- package/chrony/S49chrony | 2 -- 1 file changed, 2 deletions(-)
package/chrony/S49chrony +0 -2
@@ -4,8 +4,6 @@ [ -r /etc/default/chrony ] && . /etc/default/chrony -[ -f /etc/chrony.conf ] || exit 0 - case "$1" in start) printf "Starting chrony: "
Signature · 1 line
2.11.0
PATCH 2/2 chrony: S49chrony: drop /etc/chrony.conf check
Hello,
Quoted 11 lines · Peter Korsgaard
With
CHRONY_ARGSin/etc/default/chrony, chrony may asked to use an alternative configuration file (with the -f option), so drop the explicit/etc/chrony.confcheck.In case the configuration file isn't present chrony will anyway loudly complain which is preferable to this silent failure:
chronyd -f /non/existing/file.conf
Could not open configuration file /non/existing/file.conf : No such file or directorySigned-off-by Peter Korsgaard <[email protected]>
I really hate those stupid checks, they cause more harm than good. So it's great to remove those checks.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/2 chrony: S49chrony: drop /etc/chrony.conf check
Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hello,
Quoted 10 lines · Peter Korsgaard
With
CHRONY_ARGSin/etc/default/chrony, chrony may asked to use an alternative configuration file (with the -f option), so drop the explicit/etc/chrony.confcheck.In case the configuration file isn't present chrony will anyway loudly complain which is preferable to this silent failure:
chronyd -f /non/existing/file.conf
Could not open configuration file /non/existing/file.conf : No such file or directory
Quoted 6 lines
Quoted 1 line
Signed-off-by Peter Korsgaard <[email protected]>Acked-by Thomas Petazzoni <[email protected]>I really hate those stupid checks, they cause more harm than good. So it's great to remove those checks.
Yes, indeed. Committed both to next, thanks.
Signature · 1 line
Bye, Peter Korsgaard