Check status for ACCESS_DENIED
parent
ca3cc077d6
commit
feefa4129e
|
|
@ -15,9 +15,13 @@ function file_content {
|
||||||
while read -r; do
|
while read -r; do
|
||||||
network=($REPLY)
|
network=($REPLY)
|
||||||
echo " \"${network[2]}\": {"
|
echo " \"${network[2]}\": {"
|
||||||
|
if [ ${network[4]} = "ACCESS_DENIED" ]; then
|
||||||
|
echo " \"status\":\"${network[4]}\","
|
||||||
|
echo " \"device\":\"${network[6]}\""
|
||||||
|
else
|
||||||
echo " \"status\":\"${network[5]}\","
|
echo " \"status\":\"${network[5]}\","
|
||||||
echo " \"device\":\"${network[7]}\""
|
echo " \"device\":\"${network[7]}\""
|
||||||
|
fi
|
||||||
if [ "$counter" -eq "$network_count" ]; then
|
if [ "$counter" -eq "$network_count" ]; then
|
||||||
echo " }"
|
echo " }"
|
||||||
else
|
else
|
||||||
|
|
@ -38,6 +42,4 @@ fi
|
||||||
|
|
||||||
file_content > $FACT_FILE
|
file_content > $FACT_FILE
|
||||||
|
|
||||||
|
# TODO: Handle statuses other than OK and ACCESS_DENIED
|
||||||
# TO-DO
|
|
||||||
# Handle different states than "OK". Other statuses can mess up positions.
|
|
||||||
Loading…
Reference in New Issue