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

Andrey Borzenkov arvidjaar at gmail.com
Wed Jan 15 07:38:38 PST 2014


В Wed, 15 Jan 2014 16:20:44 +0100
Holger Schurig <holgerschurig at gmail.com> пишет:

> 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 ...


"disabled" here means only that links, listed in [Install] section, are
not present. I agree that semantic of "systemctl enable|disable" is a
bit misleading if you are new to systemd. I am not native English
speaker so I cannot suggest alternative that would not convey so strong
meaning while still being semantically correct.

To really prevent systemd from starting service ever use "mask", not
"disable".

It can be started automatically by many different means, e.g. by being
pulled in by any other unit, by adding it explicitly as systemd.unit to
kernel command line or by simply adding "3" to kernel parameters.


More information about the systemd-devel mailing list