Developing lightweight computation at the DSG edge

Commit 2b29a8f0 authored by p4u's avatar p4u
Browse files

wifi configure: attach the wifi device to the virtual interface

network configure: changed restart for reload and removed unecessary actions
parent 0e9237b8
......@@ -180,6 +180,7 @@ qmp_attach_device_to_interface() {
local device=$1
local conf=$2
local interface=$3
echo "Attaching device $device to interface $interface"
local wifi_config="$(uci -qX show wireless | sed -n -e "s/wireless\.\([^\.]\+\)\.device=$device/\1/p")"
if [ -n "$wifi_config" -a "wifi-iface" = "$(uci -q get wireless.$wifi_config)" ] ; then
uci set wireless.$wifi_config.network="$interface"
......@@ -187,6 +188,7 @@ qmp_attach_device_to_interface() {
else
uci add_list $conf.$interface.ifname="$device"
fi
}
qmp_configure_rescue_ip() {
......
......@@ -33,8 +33,8 @@ QMPINFO="/etc/qmp/qmpinfo"
# Importing files
######################
SOURCE_WIRELESS=1
. $QMP_PATH/qmp_common.sh
[ -z "$SOURCE_NET" ] && . $QMP_PATH/qmp_network.sh
###########################
# Find wireless interface
......@@ -157,14 +157,16 @@ qmp_configure_wifi_device() {
country="$(qmp_uci_get wireless.country)"
bssid="$(qmp_uci_get wireless.bssid)"
txpower="$(qmp_uci_get @wireless[$id].txpower)"
network="$(qmp_get_virtual_iface $device)"
echo "------------------------"
echo "Mac: $mac"
echo "Mode: $mode"
echo "Driver: $driver"
echo "Channel: $channel"
echo "Country: $country"
echo "Name: $name"
echo "Mac $mac"
echo "Mode $mode"
echo "Driver $driver"
echo "Channel $channel"
echo "Country $country"
echo "Network $network"
echo "Name $name"
echo "------------------------"
template="$TEMPLATE_BASE.$driver.$mode"
......@@ -184,6 +186,7 @@ qmp_configure_wifi_device() {
-e s/"#QMP_BSSID"/"$bssid"/ \
-e s/"#QMP_TXPOWER"/"$txpower"/ \
-e s/"#QMP_INDEX"/"$index"/ \
-e s/"#QMP_NETWORK"/"$network"/ \
-e s/"#QMP_MODE"/"$mode"/ > $TMP/qmp_wireless_temp
qmp_uci_import $TMP/qmp_wireless_temp
......
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