Developing lightweight computation at the DSG edge

Commit 38b2f82a authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[qmp-system] Migrate to new UCI network model (III)



On first boot call qmp_configure_smart_network() with force parameter,
and add to phydevs OpenWrt's default LAN and WAN interfaces, which may
not be detected as physical interfaces in some corner cases.

Fixes #489.
Signed-off-by: default avatarRoger Pueyo Centelles <roger.pueyo@guifi.net>
parent c928694a
......@@ -256,8 +256,13 @@ qmp_configure_smart_network() {
fi
}
done
phydevs=$(for i in ${phydevs}; do echo $i | grep -v -e ".*ap$" | sed '/./,$!d'; done | sort -u | tr -d ' ' \t)
ignore_devs=$(for i in ${ignore_devs}; do echo $i | grep -v -e ".*ap$" | sed '/./,$!d'; done | sort -u | tr -d ' ' \t)
phydevs=$(for i in ${phydevs}; do echo $i | grep -v -e ".*ap$" | sed '/./,$!d'; done | sort -u | tr -d ' ' \t | xargs)
ignore_devs=$(for i in ${ignore_devs}; do echo $i | grep -v -e ".*ap$" | sed '/./,$!d'; done | sort -u | tr -d ' ' \t | xargs)
# Add OpenWrt defaults to phydevs when force is enabled
[ "$force" == "force" ] && {
phydevs="$(echo ${phydevs} ${default_lan} ${default_wan} | tr ' ' '\n' | sort -u | xargs)"
}
echo "Physical devices to process:"
echo " - "${phydevs}
......@@ -952,7 +957,7 @@ qmp_configure_initial() {
/etc/init.d/network reload
/etc/init.d/network restart
sleep 5 # Let WiFi devices start up
qmp_configure_smart_network
qmp_configure_smart_network force
}
qmp_configure() {
......
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