aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-24 00:47:24 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-01-11 10:14:11 +0100
commit495fd67ff22996964de1abaab5498bf21288b3be (patch)
treeb248757f66d1c7eeb0f8c2da012aa9003c745628
parentcore:socket: fix string in socket_exec_command_table (diff)
downloadsystemd-495fd67ff22996964de1abaab5498bf21288b3be.tar.gz
systemd-495fd67ff22996964de1abaab5498bf21288b3be.tar.bz2
systemd-495fd67ff22996964de1abaab5498bf21288b3be.zip
systemctl: don't show vendor preset state for generated/transient units (#7711)
Showing the preset state for those suggests they could actually be enabled/disabled, but that concept doesn't exist for generated/transient units, hence hide this information. This came up here: https://lists.freedesktop.org/archives/systemd-devel/2017-December/040022.html (cherry picked from commit 15ce16477039f1bcdb7c9a4b3de8dc223804c2ca)
-rw-r--r--src/systemctl/systemctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 18c64241b..27977aff6 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -4044,7 +4044,8 @@ static void print_status_info(
if (i->load_error != 0)
printf(" Loaded: %s%s%s (Reason: %s)\n",
on, strna(i->load_state), off, i->load_error);
- else if (path && !isempty(i->unit_file_state) && !isempty(i->unit_file_preset))
+ else if (path && !isempty(i->unit_file_state) && !isempty(i->unit_file_preset) &&
+ !STR_IN_SET(i->unit_file_state, "generated", "transient"))
printf(" Loaded: %s%s%s (%s; %s; vendor preset: %s)\n",
on, strna(i->load_state), off, path, i->unit_file_state, i->unit_file_preset);
else if (path && !isempty(i->unit_file_state))