Red Hat Bugzilla – Bug 850099
Introduce new systemd-rpm macros in ebnetd spec file
Last modified: 2012-09-17 18:00:24 EDT
Fedora 18 changes the way how to work with services in spec files. It introduces new macros - %systemd_post, %systemd_preun and %systemd_postun; which replace scriptlets from Fedora 17 and older (see https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd, https://bugzilla.redhat.com/show_bug.cgi?id=850016).
Does this scriptlet work for .socket and @.service too?
Look at http://cgit.freedesktop.org/systemd/systemd/tree/src/core/macros.systemd.in
It simply calls systemctl for given unit file - so my answer is: yes, it does.
Thanks. one more question: I can stop ndtpd.socket though, how can I stop the processes for ndtpd@*.service? systemctl stop ndtpd@.service says "ntdpd@.service is not valid" and systemctl stop ndtpd.service doesn't take any effects nor errors. I did hack in the scriptlet to do that until now:
for i in `/bin/systemctl --full | grep ebnetd | grep running | cut -d' ' -f1`; do
/bin/systemctl stop $i 2>&1 || :
(In reply to comment #3)
> Thanks. one more question: I can stop ndtpd.socket though, how can I stop
> the processes for ndtpd@*.service? systemctl stop ndtpd@.service says
> "ntdpd@.service is not valid" and systemctl stop ndtpd.service doesn't take
> any effects nor errors.
You can do it by using new dependency type introduces in systemd-v188, namely PartOf, you should introduce new .target file and then add configuration stanza PartOf=ndtpd-instances.target to ndtpd@.service. Then calling calling systemctl stop ndtpd-instances.target will allow you to stop|restart all currently running instances at once. Please see man page for more information.
Thanks for kindly information and awesome work :)
ebnetd-1.0-14.fc18 has been submitted as an update for Fedora 18.
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ebnetd-1.0-14.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
ebnetd-1.0-14.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.