summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-24 00:47:24 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2017-12-24 00:47:24 +0100
commit15ce16477039f1bcdb7c9a4b3de8dc223804c2ca (patch)
treee1e3b0a14f89f260655c4f635a0d312c068ed119 /src
parentMerge pull request #7695 from yuwata/transient-socket (diff)
downloadsystemd-15ce16477039f1bcdb7c9a4b3de8dc223804c2ca.tar.xz
systemd-15ce16477039f1bcdb7c9a4b3de8dc223804c2ca.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
Diffstat (limited to 'src')
-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 50a10ace77..45e2750c0c 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -4045,7 +4045,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))