Developing lightweight computation at the DSG edge

Commit 15f8b703 authored by p4u's avatar p4u
Browse files

Fixed and improved the command used to get the MAC address from a device name

parent 00280c90
......@@ -188,7 +188,8 @@ qmp_get_wifi_mac_devices() {
# Returns the device name that corresponds to the MAC address
# qmp_get_dev_from_mac 00:22:11:33:44:55
qmp_get_dev_from_mac() {
ip l | grep $1 -i -B1 | grep -v \@ | grep -v ether | awk '{print $2}' | tr -d : | awk NR==1
ip link | grep $1 -i -B1 | grep -v \@ | egrep -v "ether|br|mon" | grep mtu | awk '{print $2}' | tr -d : | awk NR==1
}
qmp_get_mac_for_dev() {
......
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