Battlemesh logo
  • Comments
  • Edit
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
    • Edit SideBar
  • Login

Navigation

  • RecentChanges
  • FindPage
  • PastEvents
  • ContactUs
  • HelpContents
Revision 1 as of 2010-03-23 19:57:44
  • BattleMeshV3
  • NodeConfigScript
  • Zlan

BattleMeshV3/NodeConfigScript/Zlan here.

* creates an alias for the wired interface and give it an ip-address (keep the ip 192.168.1.1 unchanged for we need the node to respond to it for NodeConfigScript to work)


set -a

HOSTNAME="@PARAM1@"
WIRED_IP="@PARAM2@"
WIRELESS_IP="@PARAM3@"
CHANNEL="@PARAM4@"
CELL="@PARAM5@"

# to reset a node to it's pristine state,uncomment:
#
#firstboot
#sync
#
# this only makes sense if you're using the squashfs 
# doesn't seem to work on fonera

# setting hostname 
#
sysctl -w kernel.hostname=$HOSTNAME
uci set system.@system[0].hostname=$HOSTNAME
uci commit

# configure wired network interface
#
uci set network.zlan=alias
uci set network.zlan.interface=lan
uci set network.zlan.proto=static
uci set network.zlan.ipaddr=$WIRED_IP
uci set network.zlan.netmask=255.255.255.0
uci set network.zlan.gateway=192.168.42.1
uci set network.zlan.dns=192.168.42.1
uci commit

# disabling services
/etc/init.d/dnsmasq stop
/etc/init.d/dnsmasq disable
/etc/init.d/firewall stop
/etc/init.d/firewall disable
/etc/init.d/httpd stop
/etc/init.d/httpd disable

reboot
exit
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01