From 03a81441b1a490f8fc2a19aeb9b23299657c380c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 8 Mar 2021 20:49:53 +0100 Subject: [PATCH] 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 :( --- src/timedate/timedated.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index 1257d950ae..567244dc24 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -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);