Re: Is it intentional that "systemctl cat" outputs "# /dev/null" for a masked unit?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Di, 02.02.21 10:34, Ulrich Windl (Ulrich.Windl@xxxxxxxxxxxxxxxxxxxx) wrote:

> Well,
>
> the subject says it all: I had masked a socket unit and the related non-socket-unit failed to start.
> Trying to see the definition of the unit with "systemctl cat" I only saw "# /dev/null".
> Is that intended? "systemctl show" still shows a lot of data...
>
> My idea was when "unmask" knows how to get the unit, why shouldn't "cat" be able to, too?

Well, the idea is that "systemctl cat" presents what PID 1 would
see. When a unit file is masked, it overlayed with a symlink to
/dev/null typically, that's what you see hence.

"systemctl show" will show you only default values in this case, and
stuff that other units applied onto the masked unit (i.e. the other
end of deps and such). It will not show you anything that is from the
unit file that is masked. Which is kinda the point of masking: hiding
away the original unit file, and making sure systemd (or systemctl
cat) won't use them for anything.

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux