From a95fad071a48fb5b7ea91adf98aff59c308dae22 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Tue, 9 Mar 2021 11:33:26 +0100 Subject: [PATCH] Fix i2c-clock --- roles/i2c-clock/files/etc/systemd/system/rtc-i2c.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/i2c-clock/files/etc/systemd/system/rtc-i2c.service b/roles/i2c-clock/files/etc/systemd/system/rtc-i2c.service index 6a82903..8573790 100644 --- a/roles/i2c-clock/files/etc/systemd/system/rtc-i2c.service +++ b/roles/i2c-clock/files/etc/systemd/system/rtc-i2c.service @@ -14,7 +14,8 @@ ProtectSystem=full ProtectHome=yes DeviceAllow=/dev/rtc_i2c rw DevicePolicy=closed -ExecStart=/usr/bin/echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device && /sbin/hwclock --s +ExecStartPre=/usr/bin/echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device +ExecStart=/sbin/hwclock -s [Install] WantedBy=time-sync.target \ No newline at end of file