From 05cb4dae0d9c5fe319137a2ea0bf9c143550f182 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 7 Mar 2025 17:09:32 +1100 Subject: [PATCH] fixed line 77 to avoid grepping the word state more than once --- zfs-health-check-and-notification.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zfs-health-check-and-notification.sh b/zfs-health-check-and-notification.sh index 51bbfe9..401c7b9 100755 --- a/zfs-health-check-and-notification.sh +++ b/zfs-health-check-and-notification.sh @@ -74,7 +74,7 @@ do fi # Get the overall pool state and set notfication text. - poolOverallCondition=$(/sbin/zpool status ${pool} | grep state | awk '{print $2}') + poolOverallCondition=$(/sbin/zpool status ${pool} | awk '/state:/ {print $2}) poolConditionText="${poolConditionSubText} Overall state is reporting as **${poolOverallCondition}** for this pool."