packages/net/dcwapd/files/start_dcwapd.sh
Carey Sonsino 82a2e3f55f dcwifi: Add Dual Channel Wi-Fi component packages
dcstad: Dual Channel Wi-Fi Station Daemon
dcwapd: Dual Channel Wi-Fi Access Point Daemon
libdcwproto: Dual Channel Wi-Fi Protocol Library
libdcwsocket: Dual Channel Wi-Fi Socket Library
macremapper: MAC Address Remapper Linux Kernel Module
mrmctl: Userland tool to get/set remap rules

Signed-off-by: Carey Sonsino <careys@edgewaterwireless.com>
Signed-off-by: Carey Sonsino <csonsino@gmail.com>
2019-10-16 16:55:38 +00:00

39 lines
988 B
Bash
Executable file

#!/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 &