Developing lightweight computation at the DSG edge
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Quick Mesh Project
qMp packages
Commits
15f8b703
Commit
15f8b703
authored
Jun 01, 2012
by
p4u
Browse files
Fixed and improved the command used to get the MAC address from a device name
parent
00280c90
Changes
1
Hide whitespace changes
Inline
Side-by-side
packages/qmp-small-node/files/etc/qmp/qmp_common.sh
View file @
15f8b703
...
...
@@ -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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment