Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
systemctl: respect [Install] section in drop-ins #7158
The patch isn't complete yet. However, it has the following effects:
# /lib/systemd/system/a.service [Service] ExecStart=/bin/sleep 5566
# /etc/systemd/system/a.service.d/d.conf [Install] WantedBy=multi-user.target
# /lib/systemd/system/b@.service [Service] ExecStart=/bin/sleep 5566
# /etc/systemd/system/b@.service.d/d.conf [Install] WantedBy=multi-user.target
# /firstname.lastname@example.org/d.conf [Install] WantedBy=graphica.target
The patch has the following problems:
Any comment would be appreciated. Thanks.
keszybz left a comment
This looks like a good start, but please note that dropins files in instance .d directories should have a higher priority then the identically names files in the template .d directories. (It's possible that your patch already behaves like that. It seems to me that it doesn't, but I haven't looked at the code recently). So please test that. In general we want the same semantics as for normal dropins.
This is my second version. Still no tests for it, but I will add them in the next version. It deals with the priority between drop-in conf files and the units. Also, template drop-ins and instanced drop-ins priority is taken care of.
If this patch is fine, I will start work on the tests. Thank you.
Hi, here is my new patch. I have the following changes:
Thank you for reviewing my code.