[systemd-devel] ListenStream in an @.socket unit

Albert Strasheim fullung at gmail.com
Mon Apr 4 23:23:30 PDT 2011


Hello all

I have the following socket unit:

[Unit]
Description=unix sock

[Socket]
ListenStream=@foo/%i
Backlog=128
Service=foo@%i.service

[Install]
Alias=foo at dev1.socket
Alias=sockets.target.wants/foo at dev1.socket
Alias=foo at dev2.socket
Alias=sockets.target.wants/foo at dev2.socket
Alias=foo at dev3.socket
Alias=sockets.target.wants/foo at dev3.socket

so that I can configure a socket per device, where each device is
handled by a separate service instance.

However, ListenStream= doesn't seem to understand %i, because it
listens on @foo/%i (no substitution), causing foo at dev2.socket and
foo at dev3.socket to fail on startup.

Regards

Albert


More information about the systemd-devel mailing list