confd: save updated system time also to RTC

Fixes #367

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2024-04-03 16:08:37 +02:00
parent 814d5f6a4d
commit 528671c4cd
+4
View File
@@ -260,6 +260,10 @@ static int rpc_set_datetime(sr_session_ctx_t *session, uint32_t sub_id,
goto done;
}
/* Ensure the RTC is updated as well, in case of unclean shutdowns */
if (systemf("hwclock -uw"))
ERROR("failed saving new system date/time to RTC.");
rc = SR_ERR_OK;
done:
unsetenv("TZ");