From: Zbigniew Jędrzejewski-Szmek Date: Mon, 8 Mar 2021 19:49:53 +0000 (+0100) Subject: timedated: fix skipping of comments in config file X-Git-Tag: v248-rc3~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=03a81441b1a490f8fc2a19aeb9b23299657c380c;p=thirdparty%2Fsystemd.git 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 :( --- diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index 1257d950aee..567244dc244 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);