collect: Fix MAC address collect on Fedora

Signed-off-by: 's avatarEdileuton Henrique de Oliveira <eho09@c3sl.ufpr.br>
parent a1ac8bef
......@@ -24,4 +24,11 @@ while read mac; do
tags="$tags$newTag"
done < <(/sbin/ifconfig 2>&1 | awk '/HW/ {print $NF}' | sort -u)
if test -z "$tags"; then
while read mac; do
newTag="<mac value=\"$mac\" type=\"string\"/>"
tags="$tags$newTag"
done < <(/sbin/ifconfig 2>&1 | awk '/ether/ {print $2}' | sort -u)
fi
printf "${tags}\n"
......@@ -24,4 +24,11 @@ while read mac; do
tags="$tags$newTag"
done < <(/sbin/ifconfig 2>&1 | awk '/HW/ {print $NF}' | sort -u)
if test -z "$tags"; then
while read mac; do
newTag="<mac value=\"$mac\" type=\"string\"/>"
tags="$tags$newTag"
done < <(/sbin/ifconfig 2>&1 | awk '/ether/ {print $2}' | sort -u)
fi
printf "${tags}\n"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment