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

39 lines
988 B

#!/bin/sh
#
# Dual Channel Wi-Fi Startup Script
#
# This script creates the proper network bridge configuration
# necessary for Dual Channel Wi-Fi, and starts the dcwapd daemon
#
# Note - shellcheck cannot deal with the dynamic sourcing
# shellcheck disable=SC1090
# which also messes with variables defined in the sourced file
# shellcheck disable=SC2154
scriptdir=$(dirname -- "$(readlink -f -- "$0")")
. "$scriptdir"/dcwapd.inc
get_channelsets
# get the list of channel sets
channelsets=$result
for channelset in $channelsets; do
if [ -n "$channelset" ]; then
get_channelset_enabled "$channelset"
enabled=$result
if [ "$enabled" = "1" ]; then
# the channel set is enabled
# get the list of data channels used by the channel set
get_datachannels "$channelset"
datachannels=$result
for datachannel in $datachannels; do
datachannel_up "$datachannel"
done
fi
fi
done
# start dcwapd, sending stdout and stderr to the system log
dcwapd 2>&1 | logger &