[Cerowrt-devel] Scripting CeroWrt config
Richard Brown
richard.e.brown at dartware.com
Fri Feb 10 22:33:52 EST 2012
> > What's the best way to script this?
>
> #!/bin/sh
>
> opkg update
> opkg install snmpd fprobe
> sed -i s/172.30.42/192.168.2/g /etc/config/* /etc/babeld.conf (etc -
> the full string is on the wiki)
> # etc, etc
Bingo! The attached script is *much* easier than configuring it by hand.
Rich
#!/bin/sh
# Install and configure the various bits of the
# CeroWrt router for my preferred setup.
# 10 Feb 2012 -reb
#
# ssh root at 172.30.42.1
# cd /tmp
# cp > config.sh
# [paste in the contents of this file, then hit ^D]
# sh config.sh
# Presto!
opkg update # retrieve updated packages
opkg install snmpd fprobe # install snmpd & fprobe
/etc/init.d/snmpd start # default snmpd config uses 'public'
/etc/init.d/snmpd enable # community string for SNMPv1 & SNMPv2c
# Start fprobe now to send netflow records to local netflow
# collector at 192.168.2.13 (I use http://intermapper.com)
fprobe -i ge00 -f ip -d 15 -e 60 192.168.2.13:2055
# Also edit /etc/rc.local to add the same command
# so that it will start after next reboot
sed -i '$ i\
fprobe -i ge00 -f ip -d 15 -e 60 192.168.2.13:2055' /etc/rc.local
More information about the Cerowrt-devel
mailing list