mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-27 11:13:02 +02:00
confd: save updated system time also to RTC
Fixes #367 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user