Developing lightweight computation at the DSG edge

Commit 79367b0f authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

Merge branch 'master' into testing


Signed-off-by: default avatarRoger Pueyo Centelles <roger.pueyo@guifi.net>
parents da5ae334 5f0bebe4
......@@ -54,7 +54,12 @@ define Package/qmp-big-node
DEPENDS:= +qmp-small-node \
+qmp-tinyproxy +tinymce \
+openssl-util +luci-ssl \
+lsof +wget +bmon +bwm-ng +ebtables +pv
+tcpdump-mini \
+lsof +wget +bmon +bwm-ng +ebtables +pv \
+ipip +kmod-ipip +kmod-gre \
+luci-lib-libremap-system +luci-lib-libremap-location \
+luci-lib-libremap-bmx6 +luci-lib-libremap-qmp \
+luci-lib-libremap-contact +luci-lib-libremap-wireless
endef
define Package/qmp-big-node/description
......
......@@ -52,11 +52,9 @@ define Package/qmp-small-node
CATEGORY:=qMp
URL:=https://qmp.cat
DEPENDS:= +qmp-tiny-node \
+tcpdump-mini +mtr +netperf +luci-mod-admin-full \
+munin-mesh +mini_snmpd +cgi-bin-zero +ipip +kmod-ipip +kmod-gre \
+libremap-agent +luci-lib-libremap-contact +luci-lib-libremap-wireless \
+luci +luci-lib-libremap-system +luci-lib-libremap-location \
+luci-lib-libremap-bmx6 +luci-lib-libremap-qmp +bmx6-mdns
+mtr +netperf +luci-mod-admin-full \
+munin-mesh +mini_snmpd +cgi-bin-zero \
+libremap-agent +luci +bmx6-mdns
endef
define Package/qmp-small-node/description
......@@ -64,10 +62,8 @@ define Package/qmp-small-node/description
- qMp system configuration files and scripts
- BMX6 routing protocol
- Full LuCI web interface
- IP/TCP utils
- LibreMap
- LibreMap (agent)
- SNMP and Munin
- IP over IP tunneling support
It is intended to be used on devices with 8 MB of flash or more.
endef
......
......@@ -58,8 +58,8 @@ config 'qmp' 'services'
option vpn 0
option captive_portal 0
option b6m 0
option libremap 1
option gwck 1
option libremap 0
option gwck 0
option auto_upgrade 0
option mesh_dns 1
option bwtest 1
......
......@@ -160,22 +160,36 @@ qmp_debug() {
# Networking and Wifi related commands
#######################################
# Returns the names of the wifi devices from the system
# Returns the names of the wifi devices in the system, one per line
qmp_get_wifi_devices() {
# Legacy code, sometimes not reporting all the interfaces as they take some time to appear there
proc_net_wireless=$(awk 'NR>2 { gsub(/:$/,"",$1); print $1 }' /proc/net/wireless | grep -v -e "wlan[0-9]-[0-9]" | sort -u)
# Initial fix for #481, but some devices would still fail
sys_class_net=""
# Legacy code, sometimes not reporting all the interfaces as they take some time to appear there
local proc_net_wireless=$(awk 'NR>2 { gsub(/:$/,"",$1); print $1 }' /proc/net/wireless | grep -v -e "wlan[0-9]-[0-9]" | sort -u)
# Initial fix for #481, but some devices would still fail. Gather devices from /sys/class/net
local sys_class_net
for i in $(ls /sys/class/net/); do
[ -e /sys/class/net/${i}/phy80211 ] && sys_class_net="${sys_class_net} ${i}"
done
# Actual fix for #481, using ubus
local ubus_network_wireless=$(ubus call network.wireless status | jsonfilter -e '@.*.interfaces.*.ifname')
# Last, fetch those devices in /etc/config/wireless
local uci_show_wireless=$(uci show wireless | grep wireless\..*\.ifname | cut -d '=' -f 2 | tr -d "'")
echo $proc_net_wireless
# Print the devices gotten from /proc/net/wireless
for i in $proc_net_wireless; do
echo $i
done
# Print the remaining devices gotten from /sys/class/net
for i in $sys_class_net; do
! qmp_is_in $i $proc_net_wireless && echo $i
! qmp_is_in $i $proc_net_wireless && echo "$i"
done
# Print the remaining devices gotten from ubus
for i in $ubus_network_wireless; do
! qmp_is_in $i $proc_net_wireless && ! qmp_is_in $i $sys_class_net && echo "$i"
done
# Print the remaining devices gotten from /etc/configc/wireless
for i in $uci_show_wireless; do
! qmp_is_in $i $proc_net_wireless && ! qmp_is_in $i $sys_class_net && ! qmp_is_in $i $ubus_network_wireless && echo "$i"
done
......@@ -187,6 +201,7 @@ qmp_get_wifi_devices() {
done
}
# Returns the MAC address of the wifi devices
# (get MAC addres of the physical wifi device, if exists)
qmp_get_wifi_mac_devices() {
......
......@@ -34,7 +34,7 @@ qmp_set_mss_clamping_and_masq() {
# Prepare config files
qmp_configure_prepare_network() {
local toRemove="$(uci show network | egrep "network.(lan|wan|mesh_).*=(interface|device)" | cut -d. -f2 | cut -d= -f1)"
local toRemove="$(uci show network | egrep "network.(lan|wan|mesh_).*=(interface|device)" | cut -d. -f2 | cut -d= -f1 | egrep -v ".?an_eth.?*_dev")"
qmp_log "Removing current network configuration"
for i in $toRemove; do
uci del network.$i
......
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