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
1a24f588
Commit
1a24f588
authored
Jan 09, 2013
by
Simó Albert i Beltran
Browse files
Remove unneeded greps, to optimize, introduced in commit:
29bf4dc8
.
parent
ee1356cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
packages/qmp-small-node/files/etc/qmp/qmp_functions.sh
View file @
1a24f588
...
...
@@ -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"
}
...
...
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