Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # configuration script for wrt54g
- # vim: set foldmethod=marker et :
- . ./passwords
- # {{{ system
- uci set system.@system[0].hostname='wrt54g'
- uci set system.@system[0].timezone='CET-1CEST,M3.5.0,M10.5.0/3'
- # }}}
- # {{{ profile
- cp profile /etc/profile
- # }}}
- # {{{ dropbear
- uci set dropbear.@dropbear[0].PasswordAuth='off'
- cp christoph@thinkpad.pub /etc/dropbear/authorized_keys
- rm -f /etc/banner
- # }}}
- # {{{ network
- uci set network.lan.ipaddr='10.0.0.1'
- uci set network.lan.ip6addr='2001:6f8:11c0:0:21e:e5ff:fe46:798/64'
- uci set network.wan.proto='pppoe'
- uci set network.wan.username='04216842013'
- uci set network.wan.password="$PASSWORD_PPP"
- uci set wireless.wl0.disabled=0
- uci set wireless.@wifi-iface[0].ssid='betelgeuse'
- uci set wireless.@wifi-iface[0].encryption='psk+psk2'
- uci set wireless.@wifi-iface[0].key="$PASSWORD_WIRELESS"
- # }}}
- # {{{ hosts
- cp hosts /etc/hosts
- # }}}
- # {{{ aiccu
- uci set aiccu.@aiccu[0].username='CPX1-SIXXS'
- uci set aiccu.@aiccu[0].password="$PASSWORD_SIXXS"
- uci set aiccu.@aiccu[0].protocol='tic'
- uci set aiccu.@aiccu[0].interface='sixxs'
- uci set aiccu.@aiccu[0].tunnel_id='T14974'
- uci set aiccu.@aiccu[0].defaultroute=1
- uci set aiccu.@aiccu[0].nat=1
- uci set aiccu.@aiccu[0].heartbeat=1
- cat > /etc/ppp/ip-up.d/aiccu <<EOF
- #!/bin/sh
- /etc/init.d/aiccu restart
- EOF
- chmod +x /etc/ppp/ip-up.d/aiccu
- # }}}
- # {{{ radvd
- uci set radvd.@interface[0].ignore=0
- uci set radvd.@prefix[0].interface='lan'
- uci set radvd.@prefix[0].prefix='2001:6f8:11c0:0::/64'
- uci set radvd.@prefix[0].AdvOnLink=1
- uci set radvd.@prefix[0].AdvAutonomous=1
- uci set radvd.@prefix[0].AdvRouterAddr=1
- uci set radvd.@prefix[0].ignore=0
- # }}}
- # {{{ enable ipv6 forwarding
- sed -i -e 's/# \(net.ipv6.conf.all.forwarding=1\)/\1/' /etc/sysctl.conf
- sysctl -p >/dev/null
- # }}}
- # {{{ qos
- uci set qos.wan.enabled=1
- uci set qos.wan.upload=1024
- uci set qos.wan.download=16000
- # }}}
- # {{{ firewall
- cp firewall.user /etc/firewall.user
- # }}}
- # {{{ dynamic dns
- cp dynamicdns/dynamicdns-script /etc/ppp/ip-up.d/dynamicdns
- cp dynamicdns/orion-privkey /etc/ppp/ip-up.d/
- cp dynamicdns/orion-fingerprint /etc/ppp/ip-up.d/
- # }}}
- # {{{ cron auto-reconnect
- cat > /etc/crontabs/root <<EOF
- 0 3 * * * touch /tmp/ppp-not-disconnected
- 0 4 * * * test -e /tmp/ppp-not-disconnected && ifup wan
- EOF
- cat > /etc/ppp/ip-up.d/rm-ppp-not-disconnected <<EOF
- #!/bin/sh
- rm -f /tmp/ppp-not-disconnected
- EOF
- chmod +x /etc/ppp/ip-up.d/rm-ppp-not-disconnected
- /etc/init.d/cron enable
- /etc/init.d/cron start
- # }}}
- # {{{ commit uci settings
- uci commit
- # }}}
Add Comment
Please, Sign In to add comment