From 6bd12129aeb1aff82d305c4b64723a4b171a281d Mon Sep 17 00:00:00 2001
From: Per Cederqvist <ceder@lysator.liu.se>
Date: Sun, 14 Jan 2007 23:55:47 +0000
Subject: [PATCH] Handle two ways that zfs can fail.

---
 rules/solaris10/nrpe-host-auto.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rules/solaris10/nrpe-host-auto.sh b/rules/solaris10/nrpe-host-auto.sh
index f83db0d..72ba555 100644
--- a/rules/solaris10/nrpe-host-auto.sh
+++ b/rules/solaris10/nrpe-host-auto.sh
@@ -23,9 +23,10 @@ trap "rm -f $FILESYSTEMS $ZPOOLS" 0
 # FIXME: We need a check_zpool command, that checks the status of the pool,
 # and the capacity of the root zfs of that pool, and maybe also recursively 
 # checks all child zfs.
-if [ -f /usr/sbin/zpool ]
+if [ -f /usr/sbin/zpool ] && [ -L /dev/zfs ]
 then
     /usr/sbin/zpool list -H -o name \
+    | grep -v 'no pools available' \
     | tee $ZPOOLS \
     | awk '{ 
         print "command[check-zfs-" $1 "]='$prefix'/libexec/check_zfs " $1 
-- 
GitLab