Developing lightweight computation at the DSG edge

Commit 7dcfd47d authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[qmp-system] Fix /etc/config/mini_snmpd to ensure that br-lan and lan are not...

[qmp-system] Fix /etc/config/mini_snmpd to ensure that br-lan and lan are not both configured, which makes the daemon not boot
parent 30800e4a
......@@ -25,7 +25,7 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
QMP_RELEASE?=r20170207-1
QMP_RELEASE?=r20170207-2
QMP_CODENAME?=testing
QMP_BUILDDATE:=$(shell date +%Y%m%d-%H%M)
......
#!/bin/sh
[ -f /etc/config/mini_snmpd ] && {
# Enable mini_snmpd
uci set mini_snmpd.@mini_snmpd[0].enabled=1
if ! uci get mini_snmpd.@mini_snmpd[0].interfaces | egrep -q 'br-lan|wlan0'
then
# Remove br-lan from the interfaces list
local elem
local list="$(uci get mini_snmpd.@mini_snmpd[0].interfaces)"
uci delete mini_snmpd.@mini_snmpd[0].interfaces
for elem in $list; do
if [ "$elem" != "br-lan" ]; then
echo $elem
uci add_list mini_snmpd.@mini_snmpd[0].interfaces=$elem
fi
done
uci commit
# Ensure wlan0 is added
if ! uci get mini_snmpd.@mini_snmpd[0].interfaces | egrep -q 'wlan0'; then
uci add_list mini_snmpd.@mini_snmpd[0].interfaces="wlan0"
uci add_list mini_snmpd.@mini_snmpd[0].interfaces="br-lan"
fi
# Ensure lan is added
if ! uci get mini_snmpd.@mini_snmpd[0].interfaces | egrep -q 'lan'; then
uci add_list mini_snmpd.@mini_snmpd[0].interfaces="lan"
fi
uci commit
/etc/init.d/mini_snmpd restart
}
# Remove old items
uci_remove_list_element "olsrd.@Interface[0].interface" "wan"
uci commit
/etc/init.d/mini_snmpd restart
}
\ No newline at end of file
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