Repository navigation
Conversation
Formality Check: FailedWe checked this pull request against the contribution guidelines. Here is what needs your attention: 🛑 CRITICAL ERRORS
Tip Do not close this pull request to make corrections. Instead, modify your existing commits (e.g. Something broken? Consider reporting an issue. |
It's not mine file. The file from original package. I only removed two lines in it. |
|
|
||
| procd_open_instance | ||
| procd_set_param command $PROG -n | ||
| [ "$restore_time" == "1" ] && procd_append_param command -s |
There was a problem hiding this comment.
nit: == is a bashism; the rest of this script uses POSIX = in [ ] tests.
| [ "$restore_time" == "1" ] && procd_append_param command -s | |
| [ "$restore_time" = "1" ] && procd_append_param command -s |
Generated by Claude Code
| rtcsync | ||
|
|
||
| # Record the clock's drift | ||
| driftfile /var/run/chrony/drift |
There was a problem hiding this comment.
/etc/chrony/chrony.conf is a conffile, so if a user has modified it, the upgrade keeps their copy with this driftfile line. That line comes after confdir (line 2), so it overrides the UCI-generated directive and the new file/interval options are silently ignored. Is that acceptable, or should the upgrade path handle it (e.g. a note in the commit message, or a uci-defaults/sed migration)?
Generated by Claude Code
There was a problem hiding this comment.
It's acceptable. User which modifies /etc/chrony/chrony.conf knows what he does. My patch just changes place of driftfile /var/run/chrony/drift but doesn't change behavior.
429bef3 to
029ee37
Compare
029ee37 to
08ba5fd
Compare
chronyd can restore the system time at startup from the drift file's
modification time. This helps routers without a real-time clock recover
a more recent time after reboot when the drift file is stored on
persistent storage.
Add a UCI section to configure the drift file path, its minimum update
interval, and optional time restoration using chronyd's -s option.
Keep time restoration disabled by default and preserve the existing
drift file path. New section created by uci-defaults.
```uci
config driftfile 'driftfile'
# Set to 1 to restore time from the drift file at startup
option restore_time '0'
# Use a path on persistent storage to retain the file across reboots
option file '/var/run/chrony/drift'
# Minimum update interval in seconds; empty uses chronyd's default
option interval ''
```
Signed-off-by: Ivan Romanov <drizt72@zoho.eu>
08ba5fd to
38aac5d
Compare
chronyd can restore the system time at startup from the drift file's modification time. This helps routers without a real-time clock recover a more recent time after reboot when the drift file is stored on persistent storage.
Add a UCI section to configure the drift file path, its minimum update interval, and optional time restoration using chronyd's -s option. Keep time restoration disabled by default and preserve the existing drift file path for configurations without the new section.
📦 Package Details
Maintainer: @mlichvar
(You can find this by checking the history of the package
Makefile.)Description:
See commit message
🧪 Run Testing Details
✅ Formalities