[systemd-devel] understanding "list-unit-files" ...

Lennart Poettering lennart at poettering.net
Fri Jan 17 11:30:54 PST 2014


On Wed, 15.01.14 16:20, Holger Schurig (holgerschurig at gmail.com) wrote:

> There is one strange thing here:
> 
> root at desktop:/etc# systemctl list-unit-files | grep multi
> multi-user.target                    disabled
> root at desktop:/etc# systemctl status multi-user.target
> multi-user.target - Multi-User System
>    Loaded: loaded (/lib/systemd/system/multi-user.target; disabled)
>    Active: active since Wed 2014-01-15 15:22:14 CET; 56min ago
>      Docs: man:systemd.special(7)
> 
> 15:22:14 systemd[1]: Starting Multi-User System.
> 15:22:14 systemd[1]: Reached target Multi-User System.
> root at desktop:/etc#
> 
> 
> So, why is "list-unit-files" saying that multi-user.target is
> disabled?  It's not, it was even started automatically ...

Yeah, this is quite misleading indeed. It is casued by the [Install]
section in the units, which are supposed to useful to to switch the
default.target symlink by enabling/disabling the units. Given that this
is so confusing, and that we now have "systemctl set-default" that is
much nicer for this, I have now removed the [Install] section from these
unit files, so that they will appear as "static".

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list