root/scripts/stat_3ware_units_disco @ 96ba0c24
96ba0c24 | Marc Dequènes (Duck) | #!/bin/sh
|
|
list=
|
|||
for CONTROLLER in $(tw_cli show | grep -E "^c[0-9]+" | cut -f1 -d" "); do
|
|||
for UNIT in $(tw_cli /${CONTROLLER} show | grep -E "^u[0-9]+" | cut -f1 -d" "); do
|
|||
list=$list',{"{#UNIT}":"'/${CONTROLLER}/${UNIT}'"}'
|
|||
done
|
|||
done
|
|||
echo '{"data":['${list#,}']}'
|