Developing lightweight computation at the DSG edge

Commit 1a24f588 authored by Simó Albert i Beltran's avatar Simó Albert i Beltran
Browse files

Remove unneeded greps, to optimize, introduced in commit:29bf4dc8.

parent ee1356cf
......@@ -47,7 +47,7 @@ qmp_get_primary_device() {
if ip link show dev eth0 > /dev/null; then
primary_mesh_device="eth0"
else
primary_mesh_device="$(ip link show | egrep ^[0-9]?: | grep -v lo: | awk 'NR==1{sub(/:$/,"",$2); print $2}')"
primary_mesh_device="$(ip link show | awk '!/lo:/&&/^[0-9]?:/{sub(/:$/,"",$2); print $2; exit}')"
fi
[ -z "$primary_mesh_device" ] && echo "CRITICAL: No primary network device found, please define qmp.node.primary_device"
}
......
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