Developing lightweight computation at the DSG edge

Commit 507d2adb authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[qmp-system] Add logging verbosity for #481

Continues 6c5212f1 and
b45499e1

.

Still some devices that take extremely long to initialize the wifi
seem to put mesh wlan0 in the lan bridge. Add some verbosity and
an additional check.
Signed-off-by: default avatarRoger Pueyo Centelles <roger.pueyo@guifi.net>
parent 6c5212f1
......@@ -124,7 +124,18 @@ qmp_get_virtual_iface() {
fi
done
[ ! -e "/sys/class/net/$device/phy80211" ] && [ -n "$viface" ] && { echo $viface; return; }
qmp_log "LOG: 6"
qmp_log "Viface: $viface"
qmp_log $device $viface
[ ! -e "/sys/class/net/$device/phy80211" ] && ! qmp_is_in "$device" $(qmp_get_wifi_devices) && [ -n "$viface" ] && {
echo $viface;
qmp_log "LOG: 7"
qmp_log "Viface: $viface"
qmp_log $device $viface
echo "$viface"
return;
}
# id_char is the first char of the device: [e]th0 [w]lan1a
local id_char=$(echo $device | cut -c 1)
......@@ -137,7 +148,7 @@ qmp_get_virtual_iface() {
for w in $(qmp_get_devices wan); do
if [ "$w" == "$device" ]; then
viface="wan_${id_char}${id_num}"
qmp_log "LOG: 6"
qmp_log "LOG: 8"
qmp_log "Viface: $viface"
qmp_log $device $viface
echo $viface
......@@ -149,7 +160,7 @@ qmp_get_virtual_iface() {
for w in $(qmp_get_devices mesh); do
if [ "$w" == "$device" ]; then
viface="mesh_${id_char}${id_num}${id_extra}"
qmp_log "LOG: 7"
qmp_log "LOG: 8"
qmp_log "Viface: $viface"
qmp_log $device $viface
echo "$viface"
......
......@@ -308,7 +308,9 @@ qmp_configure_lan() {
for device in $(qmp_get_devices lan) ; do
echo " -> LAN device $device"
qmp_log "Current wifi devices:"
qmp_log $(qmp_get_wifi_devices)
for ldev in $(qmp_get_wifi_devices); do
qmp_log ${ldev}
done
if qmp_is_in "$device" $(qmp_get_wifi_devices) || [ -e "/sys/class/net/$device/phy80211" ] ; then
# Do not attach to br-lan wireless devices, they do it themselves
# somewhere else via /etc/config/wireless
......
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