From 3f52b6119837550ae622eb6ccadba22ebf05a0b1 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Wed, 7 Apr 2021 20:16:26 +0200
Subject: [PATCH] check_smartstatus - update message if sudo smartctl -H fails

---
 check_smartstatus | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/check_smartstatus b/check_smartstatus
index 5457a2a..086b185 100755
--- a/check_smartstatus
+++ b/check_smartstatus
@@ -27,6 +27,7 @@
 # 2020-02-27  v0.5  ah,ds  add /sbin to PATH variable
 # 2020-03-05  v1.0  <axel.hahn@iml.unibe.ch> switch to ph.* helper functions
 # 2021-01-22  v1.1  <axel.hahn@iml.unibe.ch> add status [no access]
+# 2021-04-07  v1.2  <axel.hahn@iml.unibe.ch> update message if sudo smartctl -H fails
 # ======================================================================
 
 
@@ -117,7 +118,7 @@ do
   if [ $iFound -eq 1 ]; then
     sudo smartctl -H $mydevice >/dev/null 2>&1
     if [ $? -ne 0 ]; then
-      ph.abort "SKIP: smartctl was found - but no sudo permissions."
+      ph.abort "SKIP: smartctl was found - but did not respond results. Maybe no sudo permissions or additional parameters required. $( udo smartctl -H $mydevice )"
     fi
   fi
 
-- 
GitLab