timedated: fix skipping of comments in config file

Reading file '/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list'
Failed to add NTP service "# This file is part of systemd.", ignoring: Invalid argument
Failed to add NTP service "# See systemd-timedated.service(8) for more information.", ignoring: Invalid argument

:(
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-03-09 14:04:21 +09:00
committed by Yu Watanabe
parent a2aa51b740
commit 03a81441b1
+1 -1
View File
@@ -211,7 +211,7 @@ static int context_parse_ntp_services_from_disk(Context *c) {
break;
word = strstrip(line);
if (isempty(word) || startswith("#", word))
if (isempty(word) || startswith(word, "#"))
continue;
r = context_add_ntp_service(c, word, *f);