Developing lightweight computation at the DSG edge

Commit 1cd23dc9 authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[qmp-system] Update qmp_get_openwrt_default_network()



The qmp_get_openwrt_default_network function stopped working since
OpenWrt commit 892fc7caa9eee9f5ef9e172677f871c02841bae8, as parsing the
board.json wouldn't provide the defaults anymore.
Signed-off-by: default avatarRoger Pueyo Centelles <roger.pueyo@guifi.net>
parent 20583505
......@@ -371,7 +371,9 @@ qmp_get_openwrt_default_network() {
[ "$role" != "lan" ] && [ "$role" != "wan" ] && return
grep -A${flen} "network" $board_file | grep -A${flen} $role | grep -m 1 -B${flen} "}" | grep -m 1 "ifname" | cut -d ":" -f2 | sed -e 's/^[ \t]*//' | cut -d '"' -f 2
# Fix for #489 after introduction of UCI bridge model (OpenWrt >= 21.02)
#grep -A${flen} "network" $board_file | grep -A${flen} $role | grep -m 1 -B${flen} "}" | grep -m 1 "ifname" | cut -d ":" -f2 | sed -e 's/^[ \t]*//' | cut -d '"' -f 2
grep -A${flen} "network" $board_file | grep -A${flen} $role | grep -m 1 -B${flen} "}" | grep -m 1 "device" | cut -d ":" -f2 | sed -e 's/^[ \t]*//' | cut -d '"' -f 2
}
qmp_attach_device_to_interface() {
......
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