#1109725 smartmontools: warning about unset env var: smartd_opts

Package:
smartmontools
Source:
smartmontools
Description:
control and monitor storage systems using S.M.A.R.T.
Submitter:
Narcis Garcia
Date:
2025-08-14 14:51:03 UTC
Severity:
normal
#1109725#5
Date:
2025-07-22 14:53:06 UTC
From:
To:
Dear Maintainer:
Reproduced in Debian GNU/Linux 13 (trixie/testing)
$ uname -a
Linux system 6.12.35+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.35-1
(2025-07-03) x86_64 GNU/Linux
$ sudo journalctl -b -p warning
Jul 22 16:24:34 system (smartd)[694]: smartmontools.service: Referenced
but unset environment variable evaluates to an empty string: smartd_opts

This is because of commented smartd_opts variable at
/etc/default/smartmontools
Yes, I know, I could uncomment or define it empty.
But on any package reinstall or upgrade file could be overwritten
/etc/default/smartmontools

#1109725#10
Date:
2025-07-22 14:56:51 UTC
From:
To:
Sorry for bad copied caption line; it should be:

REFERENCED BUT UNSET ENVIRONMENT VARIABLE EVALUATES TO AN EMPTY STRING:
SMARTD_OPTS

#1109725#17
Date:
2025-08-14 14:40:43 UTC
From:
To:
This issue shipped with trixie.

Upstream fixed it in this commit:
https://github.com/smartmontools/smartmontools/commit/ad032b6a7a7f49b4c868f46d31a68b7f180bebdc

The fix is one additional line in /etc/systemd/system/smartd.service:
+Environment=smartd_opts=''

Ubuntu also discussed this:
https://bugs.launchpad.net/ubuntu/+source/smartmontools/+bug/2107309