smartd.service now supports Type=Notify
With this systemd doesn't report started until all devices are found.
Is set in the upstream unit:
The bug has been referenced in the following commit(s):
Author: Lars Wendler <email@example.com>
AuthorDate: 2019-04-01 16:04:01 +0000
Commit: Lars Wendler <firstname.lastname@example.org>
CommitDate: 2019-04-01 16:04:41 +0000
sys-apps/smartmontools: Revbump to install shipped systemd unit file
instead of our own one.
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Lars Wendler <email@example.com>
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)
by loading configuration from a file, although not conf.d:
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: /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.
Still present. There is a build configuration option to remove it now:
But it only causes an attempt to open a file that doesn't exist, and no error. Not a major problem.