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
|
||||
fi
|
||||
|
||||
if [ "$(zpool status "$1" | grep '^ state:')" = ' state: ONLINE' ]
|
||||
status="$(zpool status "$1")"
|
||||
|
||||
if [ "$(echo "$status" | grep '^ state:')" = ' state: ONLINE' ]
|
||||
then
|
||||
echo "OK - Pool '$1' is online"
|
||||
exit 0
|
||||
else
|
||||
echo "CRITICAL - Pool '$1' is FAULTY or NOT ONLINE"
|
||||
echo "$status"
|
||||
exit 2
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue