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
This commit is contained in:
committed by
Yu Watanabe
parent
7785da68e6
commit
15ce164770
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user