]> git.ipfire.org Git - thirdparty/systemd.git/commit
systemctl: add new enablement state "alias"
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 4 May 2020 17:53:33 +0000 (19:53 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 5 May 2020 19:50:38 +0000 (21:50 +0200)
commit15d7ab87c4e5917f5788f1f8dce327a1e272bea3
treed89fe3bbad6543e042e036211fafab211707ba82
parent9c894b8579d05cf027ef6ebe4ea6648cc4535e65
systemctl: add new enablement state "alias"

For units which are aliases of other units, reporting preset status as
"enabled" is rather misleading. For example, dbus.service is an alias of
dbus-broker.service. In list-unit-files we'd show both as "enabled".  In
particular, systemctl preset ignores aliases, so showing any preset status at
all is always going to be misleading. Let's introduce a new state "alias" and
use that for all aliases.

I was trying to avoid adding a new state, to keep compatibility with previous
behaviour, but for alias unit files it simply doesn't seem very useful to show
any of the existing states. It seems that the clearly showing that those are
aliases for other units will be easiest to understand for users.
man/systemctl.xml
src/shared/install.c
src/shared/unit-file.h
src/systemctl/systemctl.c
src/test/test-install-root.c