[systemd-devel] Antw: [EXT] Re: Alias use in socket file

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Wed Sep 9 07:26:30 UTC 2020


>>> Lennart Poettering <lennart at poettering.net> schrieb am 08.09.2020 um 16:04
in
Nachricht <20200908140433.GC272410 at gardel-login>:
> On Di, 08.09.20 08:45, Belisko Marek (marek.belisko at gmail.com) wrote:
> 
>> Hi,
>>
>> I'm using yocto build systemd and I'm using openssh server which
>> create sshd.socket + sshd at .service files. With socket I can control if
>> ssh is enabled / disabled. I have an application which expects to
>> check statu of ssh.service. I tried to add Alias=ssh.service to
>> sshd.socket file and tried systemd enable sshd.socket but systemd
>> cannot see ssh.service. Is there some other way to create a link to an
>> existing socket file? Thanks
> 
> No, systemd refuses to recognize unit symlinks that change unit type
> (i.e. the unit suffix after the dot) as aliases. It also doesn't
> accept symlinks that change if a unit is templated or not. Objects
> can't magically change their type, and they cannot suddenly
> become/stop being templated or not.

Never tried such, but I hope there is a good error message when such links are
being ignored or denied ;-)

> 
> Sorry,
> 
> Lennart
> 
> ‑‑
> Lennart Poettering, Berlin
> _______________________________________________
> systemd‑devel mailing list
> systemd‑devel at lists.freedesktop.org 
> https://lists.freedesktop.org/mailman/listinfo/systemd‑devel 





More information about the systemd-devel mailing list