You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.4 KiB
Bash

#!/bin/sh
. /lib/functions.sh
. /usr/lib/configsync_lib.sh
CS_SERVICE=cswifi_son
SERVICE=wireless
PSERVICE=${CS_PREFIX}${SERVICE}
my_logger() {
logger -t configsync_executor "${CS_SERVICE}" "${@}"
}
configsync_to_system()
{
# make working copy and get values from there step by step
uci_cs export $CS_SERVICE | uci_tmp import $CS_SERVICE
my_logger "This is ${0} configsync_to_system()!"
VALUE=$(uci_tmp get ${CS_SERVICE}.son.enabled)
uci_tmp set ${PSERVICE}.son.enabled="${VALUE}"
VALUE=$(uci_tmp get ${CS_SERVICE}.son.airtimefairness)
uci_tmp set ${PSERVICE}.son.airtimefairness="${VALUE}"
VALUE=$(uci_tmp get ${CS_SERVICE}.son.bandsteering)
uci_tmp set ${PSERVICE}.son.bandsteering="${VALUE}"
VALUE=$(uci_tmp get ${CS_SERVICE}.son.ieee80211k)
uci_tmp set ${PSERVICE}.son.ieee80211k="${VALUE}"
VALUE=$(uci_tmp get ${CS_SERVICE}.son.ieee80211v)
uci_tmp set ${PSERVICE}.son.ieee80211v="${VALUE}"
VALUE=$(uci_tmp get ${CS_SERVICE}.son.ieee80211r)
uci_tmp set ${PSERVICE}.son.ieee80211r="${VALUE}"
add_to_list $CS_IMPORTSERVICELIST ${SERVICE}
}
dynamic_update()
{
my_logger "This is ${0} dynamic_update()!"
}
init()
{
my_logger "This is ${0} init()!"
}
if [ "${1}" = "init" ] || [ "${1}" = "configsync_to_system" ] || [ "${1}" = "dynamic_update" ]; then
"${@}"
else
my_logger "Unknown command ${1} in ${0}!"
fi