bundles/zfs: print zfs status
output if pool is not online
This commit is contained in:
parent
33d42e2472
commit
bca4d152ea
1 changed files with 4 additions and 1 deletions
|
@ -5,11 +5,14 @@ if [ $# -eq 0 ] ; then
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(zpool status "$1" | grep '^ state:')" = ' state: ONLINE' ]
|
status="$(zpool status "$1")"
|
||||||
|
|
||||||
|
if [ "$(echo "$status" | grep '^ state:')" = ' state: ONLINE' ]
|
||||||
then
|
then
|
||||||
echo "OK - Pool '$1' is online"
|
echo "OK - Pool '$1' is online"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "CRITICAL - Pool '$1' is FAULTY or NOT ONLINE"
|
echo "CRITICAL - Pool '$1' is FAULTY or NOT ONLINE"
|
||||||
|
echo "$status"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue