#!/bin/sh /etc/rc.common # This file is not compatible with White Russian and Kamikaze. # # identification of the device # START=90 start() { . /etc/functions.sh . /lib/config/uci.sh . /usr/lib/webif/functions.sh uci_load "webif" # Start stunnel if ssl is enabled if [ "$CONFIG_ssl_enable" = "1" ]; then killall matrixtunnel matrixtunnel -A /etc/ssl/matrixtunnel.cert -p /etc/ssl/matrixtunnel.key -d 443 -r 80 else killall matrixtunnel fi #get txpower for each wireless card and store it becuase madwifi doesn't allow you to get valid txpower #settings without a ath interface being created is_package_installed "kmod-madwifi" if [ "$?" = "0" ]; then for wifi in `ifconfig |grep "wifi" |cut -d' ' -f 1`; do athname=$(wlanconfig ath create wlandev $wifi wlanmode ap) for power in `iwlist ath0 txpower 2>&-|grep "Current Tx-Power" -v |grep "ath0" -v | cut -d'd' -f 1 |cut -d' ' -f 3`; do txpower="$txpower $power" done wlanconfig "$athname" destroy eval FORM_power="\$CONFIG_wireless_${wifi}_txpower" if [ "$FORM_power" != "$txpower" ]; then uci_set "webif" "wireless" "${wifi}_txpower" "$txpower" fi done fi if [ -e "/tmp/.uci/webif" ]; then uci_commit "webif" fi