root/scripts/stat_3ware_unit_status @ 96ba0c24
#!/bin/sh
|
|
|
|
UNIT=${1:-noexistent}
|
|
|
|
STATE=$(tw_cli "${UNIT}" show | grep -E "^u[0-9]+ " | awk '{print $3}')
|
|
|
|
if [ "${STATE}" = "OK" ]; then
|
|
echo 1
|
|
else
|
|
echo 0
|
|
fi
|