From 1076f20f586cd1c2ba4851724e28cbaadc6df184 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Thu, 22 Jun 2017 17:14:31 +0200 Subject: [PATCH] less scary messages for unimportant things --- smartdnotify | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/smartdnotify b/smartdnotify index 6c2e820..73f304b 100644 --- a/smartdnotify +++ b/smartdnotify @@ -7,7 +7,22 @@ then fi # Notify desktop user -MESSAGE="WARNING: Your hard drive is failing" +MESSAGE="SMART Disk monitor:" +case "$SMARTD_FAILTYPE" in + "EmailTest"|"Health"|"Temperature"|"Usage") + ;; + *) +# "CurrentPendingSector", // 10 +# "OfflineUncorrectableSector", // 11 +# "FailedReadSmartErrorLog", // 7 +# "ErrorCount", // 4 +# "FailedReadSmartData", // 6 +# "FailedHealthCheck", // 5 +# "FailedOpenDevice", // 9 +# "SelfTest", // 3 +# "FailedReadSmartSelfTestLog", // 8 + exit 0 +esac # direct write to terminals, do not use 'wall', because we don't want its ugly header for t in $(who | awk '{ print $2; }' | grep -e '^tty' -e '^pts/')