Bug 717479
Summary: | Provide native systemd unit file | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jóhann B. Guðmundsson <johannbg> | ||||
Component: | hddtemp | Assignee: | Ville Skyttä <ville.skytta> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | ville.skytta | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | hddtemp-0.3-0.22.beta15.fc16 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2011-08-28 05:38:50 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 713562 | ||||||
Attachments: |
|
Description
Jóhann B. Guðmundsson
2011-06-28 22:22:19 UTC
Created attachment 510371 [details]
Native systemd service for hddtemp
note this service files only deals with /dev/sd* devices you might want to take a look at ( man ) systemd.device to see if this can be done more elegantly
I don't think that'll work because systemd does not expand globs, see bug 710055. Here's what I've come up with so far, the only thing left being handling the disks for which to start the service for: [Unit] Description=Hard drive temperature monitor daemon After=syslog.target [Service] EnvironmentFile=/etc/sysconfig/hddtemp ExecStart=/usr/sbin/hddtemp -dF $HDDTEMP_OPTIONS [Install] WantedBy=multi-user.target Hum.... Could you drop tiny script snippet that generates the list of disk at startup and dumps that list under DISKS= variable in /etc/sysconfig/hddtemp which you then could call in the native systemd service file which in turn would be something like.. [Unit] Description=Hard drive temperature monitor daemon After=syslog.target [Service] EnvironmentFile=-/etc/sysconfig/hddtemp ExecStartPre=-/usr/libexec/<script snippet> ExecStart=/usr/sbin/hddtemp -dF $HDDTEMP_OPTIONS $DISKS [Install] WantedBy=multi-user.target Yes, something like that is what I've considered, but instead of doing that in the unit file, I've for now thought about doing that in the package's scriptlets as it doesn't IMO need to be run more than once. But then again, doing it in package scriptlets may cause problems on fresh setups, so in that sense doing it at service startup might be a better option. Another option I'm considering is patching hddtemp to expand globs itself if systemd doesn't gain that ability and/or looking for something like /dev/[hs]d[a-z] by default if no disks are passed as arguments. (In reply to comment #4) > looking for something like > /dev/[hs]d[a-z] by default if no disks are passed as arguments. I took this (ugly but functional) approach in 0.3-0.22.beta15. hddtemp-0.3-0.22.beta15.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/hddtemp-0.3-0.22.beta15.fc16 Package hddtemp-0.3-0.22.beta15.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing hddtemp-0.3-0.22.beta15.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/hddtemp-0.3-0.22.beta15.fc16 then log in and leave karma (feedback). hddtemp-0.3-0.22.beta15.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. |