Artix Linux Forum

Init systems => dinit => Topic started by: kixik on 21 July 2025, 01:59:53

Title: Can chronyd be called with "-r -s" args?
Post by: kixik on 21 July 2025, 01:59:53
Hello !

Originally /etc/dinit.d/chronyd comes with just -n arg, however according to https://wiki.archlinux.org/title/Chrony#Example:_intermittently_running_desktops (https://wiki.archlinux.org/title/Chrony#Example:_intermittently_running_desktops) -r -s are required if one wants to correct RTC at boot from deviations.  For systemd there's a config file /etc/sysconfig/chronyd which helps with chronyd additional args, and if something like that was available that would also be great.  For those options to work  some additional configuration on /etc/chrony.conf is required.

So perhaps something can be done.  For now, I have just modified how the daemon is called on /etc/dinit.d/chronyd, and if the it doesn't get overwritten on upgrades (*.pacnew versions of the file get generated) then that's more than enough, but I don't know if that's the case.

Greetings !
Title: Re: Can chronyd be called with "-r -s" args?
Post by: nous on 21 July 2025, 22:47:31
See NoUpgrade in pacman.conf.
Title: Re: Can chronyd be called with "-r -s" args?
Post by: konimex on 22 July 2025, 15:27:17
chrony-dinit has been updated to 20250722 to reflect the /etc/sysconfig/chronyd ability, wait for it to hit your repos. Thanks for the report.
Title: Re: Can chronyd be called with "-r -s" args?
Post by: kixik on 23 July 2025, 09:53:27
chrony-dinit has been updated to 20250722 to reflect the /etc/sysconfig/chronyd ability, wait for it to hit your repos. Thanks for the report.

Yay:

Code: [Select]
% pacman -Qs chrony-dinit
local/chrony-dinit 20250722-1 (dinit-world)
    dinit service scripts for chrony

% pacman -Ql chrony-dinit
chrony-dinit /etc/
chrony-dinit /etc/dinit.d/
chrony-dinit /etc/dinit.d/chrony
chrony-dinit /etc/dinit.d/chronyd
chrony-dinit /usr/
chrony-dinit /usr/lib/
chrony-dinit /usr/lib/dinit/
chrony-dinit /usr/lib/dinit/chronyd

% bat /etc/dinit.d/chronyd
type            = process
command         = /usr/lib/dinit/chronyd
smooth-recovery = true
depends-on      = network.target
depends-on      = local.target

% bat /usr/lib/dinit/chronyd
#!/bin/sh
[ -r /etc/sysconfig/chronyd ] && . /etc/sysconfig/chronyd
exec /usr/bin/chronyd -n $OPTIONS

Very cool !   Thanks a lot !