FS#32354 - [chrony] Should take options from /etc/conf.d/chrony.conf

Attached to Project: Community Packages
Opened by J. Berger (jmb) - Thursday, 01 November 2012, 10:15 GMT
Last edited by Dave Reisner (falconindy) - Thursday, 01 November 2012, 11:35 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Currently, the initscript for chrony takes its options from the NTPD_ARGS variable in rc.conf. The SystemD unit file does not allow to set options at all.

The attached files allow the configuration to be set in /etc/conf.d/chrony and should work with both initcripts and SystemD. They should also be compatible with existing setups.
This task depends upon

Closed by  Dave Reisner (falconindy)
Thursday, 01 November 2012, 11:35 GMT
Reason for closing:  Not a bug
Additional comments about closing:  We avoid use EnvironmentFile wherever possible.
Comment by Greg (dolby) - Thursday, 01 November 2012, 10:56 GMT
You should copy the service file to /etc and add your options there. Systemd doesnt support conf.d files.
Comment by J. Berger (jmb) - Thursday, 01 November 2012, 11:28 GMT
Unfortunately this means that if the unit file is upgraded, I will need to propagate the changes to my copy of the unit file.

SystemD is actually neutral with respects to the conf.d files: it doesn't support them actively but it allows supporting them. If you read this blog post by LP: http://0pointer.de/blog/projects/on-etc-sysinit.html it is clear that he believes such options should go into chrony's configuration files instead of chronyd's command line. But he also says that using EnvironmentFile is an appropriate workaround to set command-line options for those daemons that require it: "If your sysconfig file only knows simple options EnvironmentFile=-/etc/sysconfig/foobar (See systemd.exec(5) for more information about this option.) may be used to import the settings into the environment and use them to put together command lines."

This has the added benefit of keeping compatibility with the legacy rc system while Arch still officially supports it.
Comment by Greg (dolby) - Thursday, 01 November 2012, 11:34 GMT
"Unfortunately this means that if the unit file is upgraded, I will need to propagate the changes to my copy of the unit file."

Assuming there are no changes to the file in lib, not if you copy it to /etc, no.

See  FS#32336  and  FS#32275 . Even if systemd supports it, Arch doesnt. The consensous seems to be 'systemd all the way'. Initscripts is essentially dead.
Comment by Dave Reisner (falconindy) - Thursday, 01 November 2012, 11:35 GMT
systemd-delta is designed to help with drift between files in /etc and elsewhere.

Loading...