summaryrefslogtreecommitdiff
path: root/src/shared/pretty-print.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-07-21 15:06:35 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-07-22 15:21:20 +0200
commitafaae43bb191dc187a366fc3595b6b4e34039acf (patch)
tree2e8b9b2d2129133b151695c6bd438ad6bd102415 /src/shared/pretty-print.c
parent670fb0b48360c856f0054fa16fc849fc4f2dbf07 (diff)
downloadsystemd-afaae43bb191dc187a366fc3595b6b4e34039acf.tar.gz
timedated: add back support for ntp-units.d/
We removed support for foreign services (and ntp-units.d/) in b72ddf0f4. Support for foreign services was added back in 5d280742, but through an environment variable. The problem with the env var approach is that it only works as a mechanism to select one item, and doesn't work nicely as a mechinism to create a list of items through drop-ins (because the env var can be easily overridden, but not extended). Having a list of "ntp providers" is important to be able to reliably disable all of them when that is requested. Another problem is that nobody ever bothered to care about our new "standard". ntp-units.d/ is a nice simple format that works and is already supported by chrony and ntpd and timedatex. If we were to introduce and ask people to follow a new standard, there should be some good reason for this. The idea with env vars has lower functionality, requires systemd-specific syntax. We should just re-adopt the format that we originally introduced and that seems to work for everyone, and more on to more interesting problems.
Diffstat (limited to 'src/shared/pretty-print.c')
-rw-r--r--src/shared/pretty-print.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/pretty-print.c b/src/shared/pretty-print.c
index c602e036eb..96e74a758f 100644
--- a/src/shared/pretty-print.c
+++ b/src/shared/pretty-print.c
@@ -247,6 +247,11 @@ static int guess_type(const char **name, bool *is_usr, bool *is_collection, cons
if (path_equal(n, "kernel/install.d"))
ext = ".install";
+ if (path_equal(n, "systemd/ntp-units.d")) {
+ coll = true;
+ ext = ".list";
+ }
+
if (PATH_IN_SET(n, "systemd/system-preset", "systemd/user-preset")) {
coll = true;
ext = ".preset";