diff options
author | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-09-16 20:29:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-16 20:29:37 +0300 |
commit | 7a71f27adbaaf52444062f9d2d2064ec0899c20b (patch) | |
tree | 82d22e74d60b61ff5d8c452a01d96cdf3cfc5257 /op-mode-definitions/date.xml.in | |
parent | 1844176cd1fa1e12f4a8e443d2d36ade433393ae (diff) | |
download | vyos-1x-7a71f27adbaaf52444062f9d2d2064ec0899c20b.tar.gz vyos-1x-7a71f27adbaaf52444062f9d2d2064ec0899c20b.zip |
op-mode: T6715: manually changing time/date is not synced into hardware clock (#4074)
When not using NTP and adjusting the current system time/date using set date
the time is not saved across a reboot into the hardware RTC. This commit
explicitly syncs the current time after a change into the systems RTC.
Most routers do not run without NTP (which is even a VyOS default) so the
priority is pretty low.
(cherry picked from commit 835126e249c1a8b7ae87ac169a8eb9d2df979249)
Co-authored-by: Christian Breunig <christian@breunig.cc>
Diffstat (limited to 'op-mode-definitions/date.xml.in')
-rw-r--r-- | op-mode-definitions/date.xml.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/op-mode-definitions/date.xml.in b/op-mode-definitions/date.xml.in index 6d8586025..4e62a8335 100644 --- a/op-mode-definitions/date.xml.in +++ b/op-mode-definitions/date.xml.in @@ -35,7 +35,7 @@ <list><MMDDhhmm> <MMDDhhmmYY> <MMDDhhmmCCYY> <MMDDhhmmCCYY.ss></list> </completionHelp> </properties> - <command>/bin/date "$3"</command> + <command>sudo bash -c "/bin/date '$3' && hwclock --systohc --localtime"</command> </tagNode> </children> </node> |