bundles/systemd: fix edgecase in check_timesyncd_sync

This commit is contained in:
Franzi 2022-12-18 11:34:21 +01:00
parent a008a47559
commit 8621c726bb
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -29,6 +29,11 @@ try:
print('NTP service is active, but could not get offset. Something is wrong.')
exit(1)
if out in ('+0', '-0', '0'):
# if the offset is exactly zero, timedatectl only shows '0', thus
# breaking the logic below.
out = '0ms'
if out.startswith('+'):
out = out[1:]