Need help with nut systemd scriptlets and multiple services and targets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The nut package has a number of different systemd units:

 /usr/lib/systemd/system/nut-driver-enumerator.path
 /usr/lib/systemd/system/nut-driver-enumerator.service
'/usr/lib/systemd/system/nut-driver@.service'
 /usr/lib/systemd/system/nut-driver.target
 /usr/lib/systemd/system/nut-server.service
 /usr/lib/systemd/system/nut.target

And I have a number of questions about how to handle them:

* I think we want a preset to automatically enable and start
nut-driver-enumerator.path.  This monitors /etc/ups/ups.conf and runs
nut-driver-enumerator.service when it does.  It also has:

[Install]
WantedBy=nut.target

Does that seem appropriate?  Is is possible to start it immediately after
install in %post?


* What is a user expected to do to enable and start "nut"?  It seems like:

systemctl enable nut.target
systemctl start nut.target

Would do the trick, but I don't think it's very intuitive - most users think
in terms of service units I think.

It also doesn't seem to work without nut-driver-enumerator.service having run
to configure and start the nut-driver@UPS.service instance.  Because starting
nut.target does not appear to run nut-driver-enumerator.service, at least on EL8.


* What systemd scriptlets should get called?  Do we call them on target or
path units as well?  The packaging guidelines don't seem to mention those
types specifically, but I do see them in various spec files.


Thank you very much for any guidance.

-- 
Orion Poplawski
IT Systems Manager                         720-772-5637
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion@xxxxxxxx
Boulder, CO 80301                 https://www.nwra.com/

<<attachment: smime.p7s>>

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux