forked from evolix/ansible-roles
nagios-nrpe: check_hpraid: Use printf for return lines
This commit is contained in:
parent
b47d2b872c
commit
09e17ffe6c
|
@ -230,7 +230,7 @@ for slot in $slots; do
|
||||||
exit "$STATE_UNKNOWN"
|
exit "$STATE_UNKNOWN"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
check2="$check2$check2b"
|
printf -v check2 "%s\n%s" "$check2" "$check2b"
|
||||||
if [ "$DEBUG" = "1" ]; then
|
if [ "$DEBUG" = "1" ]; then
|
||||||
echo "### Get \"physicaldrive\" for slot >>>\n""${check2b}""\n"
|
echo "### Get \"physicaldrive\" for slot >>>\n""${check2b}""\n"
|
||||||
fi
|
fi
|
||||||
|
@ -278,7 +278,7 @@ elif grep -qiE FIRMWARE <<< "$check"; then
|
||||||
else
|
else
|
||||||
if [ "$DEBUG" = "1" ] || [ "$VERBOSE" = "1" ]; then
|
if [ "$DEBUG" = "1" ] || [ "$VERBOSE" = "1" ]; then
|
||||||
check3=$(grep -E Status <<< "$check")
|
check3=$(grep -E Status <<< "$check")
|
||||||
echo "RAID OK: ${check2} [${check3}]"
|
printf "RAID OK: %s\n%s\n" "$check2" "$check3"
|
||||||
else
|
else
|
||||||
echo "RAID OK"
|
echo "RAID OK"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue