FS#48162 - [smartmontools] 6.4-2 wrong path to environment file in smartd service

Attached to Project: Arch Linux
Opened by Boogie (boogie) - Saturday, 13 February 2016, 11:16 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 13 September 2020, 12:10 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Christian Hesse (eworm)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Currently:
# systemctl cat smartd.service
...
[Service]
EnvironmentFile=-/etc/default/smartmontools
...

Must be:
# systemctl cat smartd.service
...
[Service]
EnvironmentFile=-/etc/conf.d/smartd
...
This task depends upon

Closed by  Jelle van der Waa (jelly)
Sunday, 13 September 2020, 12:10 GMT
Reason for closing:  Fixed
Additional comments about closing:  smartmontools-7.1-4
Comment by Konstantin Shalygin (k0ste) - Sunday, 30 April 2017, 08:21 GMT
This issue is still exists. Up.
Comment by MushiMushy (MushiMushy) - Thursday, 07 September 2017, 17:22 GMT
Environment file is installed in /etc/conf.d/smartd while smartd.service is looking for it in /etc/default/smartmontools.
Comment by Thomas Weidner (thomas001le) - Sunday, 13 January 2019, 22:29 GMT
*bump* this issue is still there in version 7.0-1. The patch is trivial.
Comment by Andreas Klauer (frostschutz) - Tuesday, 09 July 2019, 20:24 GMT
ran into this issue today. On my system /etc/conf.d/smartd is now linked to /etc/default/smartmontools so both files are the same, in case future update will change the file it looks for and breaks it for me... (when trivial fixes are not so trivial).

(My smartd runs with savestates option as otherwise selective selftests won't work, thanks to harddrives that do not remember the last tested region, and I do not enjoy 24-hour-long selftests.)
Comment by Lars Gustäbel (gustaebel) - Wednesday, 18 September 2019, 06:55 GMT
This patch lets the systemd unit point to /etc/conf.d/smartd which is the preferred way AFAIK.
Comment by Jakub Klinkovský (lahwaacz) - Thursday, 20 August 2020, 19:30 GMT
The configure script has a --with-systemdenvfile flag: https://github.com/smartmontools/smartmontools/blob/e2957bb0b74d3782a57fa708893eaa7a3480a264/smartmontools/configure.ac#L356

So I think the best solution is adding "--with-systemdenvfile=/etc/conf.d/smartd" to the PKGBUILD (not tested though...)

Loading...