익명 03:55

systemd generator and dependency on multi-user.target.wants

systemd generator and dependency on multi-user.target.wants

I have a systemd-generator script which I wrote some years ago and which is now broken after upgrading the system from Debian Bookworm to Trixie. The generator basically creates some services by creating appropriately-named symlinks in /run/systemd/generator/multi-user.target.wants/ to a "template service file" (i.e. a service file with @ in its name).

Starting with Debian Trixie there is no multi-user.target.wants subdirectory in /run/systemd/generator/ . Should I just create this subdirectory myself? Or is there some better subdirectory where to place the symlinks? Or is there some better and completely different way to create these services?

This is running on a headless server. I want to the generated services to be started basically when the system is running normally.



Top Answer/Comment:

The .wants/ directories have never been pre-created. The only part guaranteed to exist is the actual base directory given through $1$3 or argv[1]argv[3] (which you should honor and not hardcode /run/systemd/generator), but when generating drop-ins or symlinks you're expected to create any sub-directories you need.

If you had one previously, it was there most likely because another generator from some other package had created it in order to put its own symlinks there.

상단 광고의 [X] 버튼을 누르면 내용이 보입니다