Developing lightweight computation at the DSG edge

Commit 46c24d23 authored by hakais's avatar hakais
Browse files

Fixed autoconf problem

parent d071dba9
......@@ -16,10 +16,11 @@ configure() {
echo "[Configuring networking]"
. $QMP_DIR/qmp_functions.sh
qmp_configure
/etc/init.d/network restart
# /etc/init.d/network restart
# /etc/init.d/bmx6 restart
touch "$CONTROL_FILE"
echo "Done"
echo "Done, rebooting system to complete configuration"
reboot
}
start() {
......
......@@ -27,6 +27,9 @@ qmp_get_wifi_mac_devices() {
echo "$(ip link | grep -A1 -E ": (wifi|wlan).: " | grep link | cut -d' ' -f6)"
}
qmp_get_dev_from_mac() {
ip l | grep $1 -i -B1 | grep -v \@ | grep -v ether | awk '{print $2}' | tr -d :
}
reverse_order() {
echo "$@" | awk '{for (i=NF; i>0; i--) printf("%s ",$i);print ""}'
}
......
......@@ -46,7 +46,15 @@ s_wireless:option(Value,"name","Wireless name")
--local device = m:get(s_wireless, "channel")
--device = m:get(s_wireless,"channel")
channel = s_wireless:option(Value,"channel","Channel")
channel = s_wireless:option(ListValue,"channel","Channel")
function channel.cfgvalue(self, section)
local dev = m.uci:get("wireless", section, "device")
for _, ch in ipairs(luci.sys.wifi.channels(dev)) do
channel:value(ch.channel, ch.channel)
end
return ListValue.cfgvalue(self, section)
end
return m
......
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