Developing lightweight computation at the DSG edge

Commit 70a43416 authored by Pau Escrich's avatar Pau Escrich
Browse files

Wrtnode hook: add wireless device (needed if not yet added)

qmp_autoconf: do pepare_wifi before executing hooks
parent 889d3e71
......@@ -76,17 +76,17 @@ configure() {
log Starting qmp configuration...
log Waiting 10 seconds to be sure all is configured
sleep 10
# Execute birth hooks if it is the first boot of the device
[ ! -e "$BIRTH_FILE" ] && exechooks birth && touch "$BIRTH_FILE"
# Generating default wifi configuration
log "[Configuring wifi]"
log "[Preparing wifi]"
country="$(uci get qmp.wireless.country 2>/dev/null)"
country="${country:-00}"
log Using countrycode $country
prepare_wifi
# Execute birth hooks if it is the first boot of the device
[ ! -e "$BIRTH_FILE" ] && exechooks birth && touch "$BIRTH_FILE"
# Configure system and reboot
. $QMP_DIR/qmp_functions.sh
log "[Configuring initial system]"
qmp_configure_initial
......
......@@ -7,6 +7,7 @@ STAGE="$1"
uci set qmp.interfaces.mesh_devices="wlan0"
uci set qmp.interfaces.lan_devices="eth0"
uci set qmp.networks.disable_mesh_dhcp="0"
uci add qmp wireless
uci set qmp.@wireless[0]=wireless
uci set qmp.@wireless[0].mode=adhoc
uci set qmp.@wireless[0].device=wlan0
......
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