id summary reporter owner description type status priority milestone component version resolution keywords cc 1572 smartmontools 7.2: mailer call in wrong way evgeniy "I have such configuration in /etc/smartd.conf: /dev/nvme0n1 -a -d nvme -n sleep -m root -M daily -M exec /etc/smartd_warning.sh /etc/smartd_warning.sh is default one except: Except such lines right after ""set -e"": echo ""smartd_warning.sh start"" | logger -t ""smartd script"" echo ""args: $@"" | logger -t ""smartd script"" And recently I saw this in log: Feb 26 13:58:43 15inch logger[1045974]: smartd script: smartd_warning.sh start Feb 26 13:58:43 15inch logger[1045976]: smartd script: args: -s SMART error (ErrorCount) detected on host: 15inch root Feb 26 13:58:43 15inch smartd[861]: Warning via /etc/smartd_warning.sh to root produced unexpected output (809 bytes) to STDOUT/STDERR: Feb 26 13:58:43 15inch smartd[861]: smartd 6.3 warning message script Feb 26 13:58:43 15inch smartd[861]: Usage: Feb 26 13:58:43 15inch smartd[861]: export SMARTD_MAILER='Path to external script, empty for ""mail""' Feb 26 13:58:43 15inch smartd[861]: export SMARTD_ADDRESS='Space separated mail adresses, empty if none' Feb 26 13:58:43 15inch smartd[861]: export SMARTD_MESSAGE='Error Message' Feb 26 13:58:43 15inch smartd[861]: export SMARTD_FAILTYPE='Type of failure, ""EMailTest"" for tests' Feb 26 13:58:43 15inch smartd[861]: export SMARTD_TFIRST='Date of first message sent, empty if none' Feb 26 13:58:43 15inch smartd[861]: #export SMARTD_TFIRSTEPOCH='time_t format of above' Feb 26 13:58:43 15inch smartd[861]: export SMARTD_PREVCNT='Number of previous messages, 0 if none' Feb 26 13:58:43 15inch smartd[861]: export SMARTD_NEXTDAYS='Number of days until next message, empty if none' Feb 26 13:58:43 15inch smartd[861]: export SMARTD_DEVICEINFO='Device identify information' Feb 26 13:58:43 15inch smartd[861]: #export SMARTD_DEVICE='Device name' Feb 26 13:58:43 15inch smartd[861]: #export SMARTD_DEVICESTRING='Annotated device name' Feb 26 13:58:43 15inch smartd[861]: #export SMARTD_DEVICETYPE='Device type from -d directive, ""auto"" if none' Feb 26 13:58:43 15inch smartd[861]: /etc/smartd_warning.sh [--dryrun] Feb 26 13:58:43 15inch smartd[861]: Warning via /etc/smartd_warning.sh to root: failed (32-bit/8-bit exit status: 256/1) So for some reason there is some additional argument ""-s"" was passed to smartd_warning.sh and also message was passed not via environment variable, while manual page tells that message should be in SMARTD_MESSAGE" defect closed minor smartd invalid smartd.conf