smartd.service now supports Type=Notify https://www.smartmontools.org/browser/tags/RELEASE_7_0/smartmontools/NEWS#L46 With this systemd doesn't report started until all devices are found. Is set in the upstream unit: https://www.smartmontools.org/browser/tags/RELEASE_7_0/smartmontools/smartd.service.in
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=679dec1eb076d77ca4ecd51b5b9846f3208bfb8d commit 679dec1eb076d77ca4ecd51b5b9846f3208bfb8d Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2019-04-01 16:04:01 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2019-04-01 16:04:41 +0000 sys-apps/smartmontools: Revbump to install shipped systemd unit file instead of our own one. Bug: https://bugs.gentoo.org/678990 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> sys-apps/smartmontools/smartmontools-7.0-r1.ebuild | 150 +++++++++++++++++++++ sys-apps/smartmontools/smartmontools-9999.ebuild | 3 +- 2 files changed, 151 insertions(+), 2 deletions(-)
Please test =sys-apps/smartmontools-7.0-r1 and report back if that fixes this bug.
Thanks. That adds Type=notify. The complication with the shipped file is that it does break the Gentoo Unit file guidelines (5) https://wiki.gentoo.org/wiki/Project:Systemd/Ebuild_policy#Unit_file_guidelines by loading configuration from a file, although not conf.d: EnvironmentFile=-/etc/default/smartmontools ExecStart=/usr/sbin/smartd -n $smartd_opts The file /etc/default/smartmontools is not installed by the ebuild.
Current smartmontools stable version is 7.1 and has Type=notify. It does generate a warning that StandardOutput=syslog is obsolete: [ 7.577972] systemd[1]: /lib/systemd/system/smartd.service:10: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Still an issue with sys-apps/smartmontools-7.2?
I didn't actually install 7.2, but it was resolved upstream in https://www.smartmontools.org/changeset/5077 and according to the changelog that's part of 7.2.
1) syslog warning is indeed resolved in sys-apps/smartmontools-7.2. 2) Type=notify was already resolved. 3) EnvironmentFile=-/etc/default/smartmontools Still present. There is a build configuration option to remove it now: ./configure --with-systemdenvfile=no But it only causes an attempt to open a file that doesn't exist, and no error. Not a major problem.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49a34318d9702773834a4af66768ec6978dfdec6 commit 49a34318d9702773834a4af66768ec6978dfdec6 Author: Dennis Lamm <expeditioneer@gentoo.org> AuthorDate: 2024-02-16 13:37:46 +0000 Commit: Dennis Lamm <expeditioneer@gentoo.org> CommitDate: 2024-02-19 19:54:32 +0000 sys-apps/smartmontools: improved systemd service Removed undesired reference to EnvironmentFile Bug: https://bugs.gentoo.org/678990 Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/35373 Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org> sys-apps/smartmontools/smartmontools-7.4-r1.ebuild | 157 +++++++++++++++++++++ sys-apps/smartmontools/smartmontools-9999.ebuild | 7 +- 2 files changed, 161 insertions(+), 3 deletions(-)