fix copy and paste error

This commit is contained in:
forest 2021-12-09 12:46:07 -06:00
parent f2e03919d7
commit 1748b869f1

View File

@ -4,7 +4,7 @@
printf '[' printf '['
delimiter="" delimiter=""
virsh net-list --all | tail -n +3 | awk '{ print $1 }' | while read -r network_name; do virsh net-list --all | tail -n +3 | awk '{ print $1 }' | while read -r network_name; do
if [ "$line" != "" ]; then if [ "$network_name" != "" ]; then
virtual_bridge_name="$(virsh net-info "$network_name" | grep -E '^Bridge:' | awk '{ print $2 }')" virtual_bridge_name="$(virsh net-info "$network_name" | grep -E '^Bridge:' | awk '{ print $2 }')"
capsul_state="$(echo "$line" | sed -E 's/^ *[0-9-]+ +[^ ]+ +//')" capsul_state="$(echo "$line" | sed -E 's/^ *[0-9-]+ +[^ ]+ +//')"
printf '%s\n {"name":"%s", "virtual_bridge_name":"%s"}' "$delimiter" "$network_name" "$virtual_bridge_name" printf '%s\n {"name":"%s", "virtual_bridge_name":"%s"}' "$delimiter" "$network_name" "$virtual_bridge_name"