#!/bin/sh ### # # FreeWLAN Addons - http://www.freewlan.info, written by ChrisPHL # # This Script is based on the original La Fonera Firmware version 0.7.1r2 # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA # # http://www.gnu.org/copyleft/gpl.html # ### echo "`uptime | awk -F" " '{print $1}'`: entering $0" >>/tmp/.startup_log . /etc/functions.sh # establish ssh and webif access before everything (but only at first boot) if [ ! -f /tmp/.fallback_up_and_running ]; then cat > /tmp/network-config <&- >&- && exec $0 $* } & exit 0 } }; done if [ ! -f /var/run/dropbear.pid ]; then config_load remote config_get ssh method ssh config_get ssh_port method ssh_port if [ ${#ssh_port} = "0" ]; then /usr/sbin/dropbear else /usr/sbin/dropbear -p 22 -p $ssh_port fi fi #bring up httpd httpd -p 80 -h /www -r `cat /etc/hostname` # setup firewall for access iptables -I INPUT -i eth0 -s 169.254.0.0/16 -j ACCEPT touch /tmp/.fallback_up_and_running fi