sysutils/smartmontools: periodic should always alert about failing disks

Periodic scripts should return rc=1 for informational messages.  For matters
that require urgent attention, then should return rc=3 (or greater).  A
SMART imminent failure prediction requires urgent attention, so it should
return rc=3.

PR:		246785
Approved by:	samm (maintainer timeout)
Sponsored by:	Axcient
This commit is contained in:
Alan Somers 2020-06-11 14:04:00 +00:00
parent 4537aa0957
commit f997439c1b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=538488
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= smartmontools
PORTVERSION= 7.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= SF

View File

@ -74,9 +74,9 @@ case "${daily_status_smart_enable}" in
${trim_junk} "${tmpfile}"
elif [ `grep -c '^SMART support is: Unavailable' ${tmpfile}` -eq 1 ] ; then
rc=2
echo "N/A"
echo "N/A"
else
rc=1
rc=3
${smartctl} ${devflags} ${daily_status_smartctl_extra_status_flags} \
${device} | ${trim_junk}
fi