rendered paste body# Update ipkg lists, install packages
ipkg update
ipkg install tcpdump netsnmp-server
# Update nvram config
mtd clear nvram
nvram set wan_hostname=$USER.$DOMAIN.bristolwireless.net
#eth1 for v2.0 v2.2 v3.0 gs, eth2 for v1.0 v1.1
nvram set wifi_ifname=eth1
nvram set wifi_ipaddr=$CLIENTIP
nvram set wifi_netmask=255.255.255.0
nvram set wifi_proto=static
nvram set wl_mode=sta
nvram set wl_infra=1
nvram set wl_ssid=$SSID
nvram set wl_antdiv=0
# vlan0 for v2.0 v2.2 v3.0 gs, vlan2 for v1.0 v1.1
nvram set lan_ifname=vlan0
nvram set lan_ipaddr=$LANIP
nvram set lan_netmask=$LANMASK
# Update /etc/dnsmasq.conf
rm /etc/dnsmasq.conf
echo "# BW Client dnsmasq.conf" > /etc/dnsmasq.conf
echo "domain-needed" >> /etc/dnsmasq.conf
echo "bogus-priv" >> /etc/dnsmasq.conf
echo "filterwin2k" >> /etc/dnsmasq.conf
echo "domain=$DOMAIN" >> /etc/dnsmasq.conf
echo "except-interface=vlan1" >> /etc/dnsmasq.conf
echo "dhcp-authoritative" >> /etc/dnsmasq.conf
echo "dhcp-range=$DHCPSTART,$DHCPEND,$LANIP,$LANMASK,12h" >> /etc/dnsmasq.conf
echo "dhcp-leasefile=/tmp/dhcp.leases" >> /etc/dnsmasq.conf
echo "dhcp-option=6,$DNS1" >> /etc/dnsmasq.conf
# Sort out init stuff
rm /etc/init.d/*firewall*
# save nvram and reboot
nvram commit
reboot