#!/bin/sh echo "`uptime | awk -F" " '{print $1}'`: entering $0" >>/tmp/.startup_log . /etc/functions.sh sysctl -w dev.wifi0.diversity=0 sysctl -w dev.wifi0.rxantenna=1 sysctl -w dev.wifi0.txantenna=1 [ -s /etc/hostname ] || cat /proc/sys/kernel/hostname > /etc/hostname sysctl -w kernel.hostname=`cat /etc/hostname` echo "`uptime | awk -F" " '{print $1}'`: $0 bringing down all interfaces but ath0" >>/tmp/.startup_log /sbin/ifdown ath2 /sbin/ifdown ath1 /sbin/ifdown eth0 /sbin/ifdown br_all echo "`uptime | awk -F" " '{print $1}'`: $0 bringing down all interfaces done" >>/tmp/.startup_log config_load fon config_get mode wan mode config_get wanbridge wan bridge config_load router config_get eth0_on eth0 eth0_on [ -z "$wanbridge" ] && wanbridge=0; case "$mode" in ################################################## wlan) echo "`uptime | awk -F" " '{print $1}'`: $0 running mode \"wlan\"" >>/tmp/.startup_log case "$eth0_on" in 3) echo "`uptime | awk -F" " '{print $1}'`: $0 eth0_on is \"3\"" >>/tmp/.startup_log cat > /tmp/network-config <>/tmp/.startup_log case "$wanbridge" in 1) echo "`uptime | awk -F" " '{print $1}'`: $0 wanbridge is \"1\"" >>/tmp/.startup_log cat > /tmp/network-config <>/tmp/.startup_log cat > /tmp/network-config <>/tmp/.startup_log cat > /tmp/network-config <>/tmp/.startup_log cat > /tmp/network-config <>/tmp/.startup_log case "$wanbridge" in 1) echo "`uptime | awk -F" " '{print $1}'`: $0 wanbridge is \"1\"" >>/tmp/.startup_log cat > /tmp/network-config <>/tmp/.startup_log cat > /tmp/network-config <