<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>BattleMeshV3/NodeConfigScript/Zlan</title><revhistory><revision><revnumber>1</revnumber><date>2010-03-23 19:57:44</date><authorinitials>ptr_here</authorinitials></revision></revhistory></articleinfo><para>BattleMeshV3/NodeConfigScript/Zlan here. </para><para>* 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 <ulink url="http://www.battlemesh.org/BattleMeshV3/NodeConfigScript/Zlan/NodeConfigScript#">NodeConfigScript</ulink> to work) </para><screen><![CDATA[
set -a
]]><![CDATA[
HOSTNAME="@PARAM1@"
WIRED_IP="@PARAM2@"
WIRELESS_IP="@PARAM3@"
CHANNEL="@PARAM4@"
CELL="@PARAM5@"
]]><![CDATA[
# 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
]]><![CDATA[
# setting hostname 
#
sysctl -w kernel.hostname=$HOSTNAME
uci set system.@system[0].hostname=$HOSTNAME
uci commit
]]><![CDATA[
# 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
]]><![CDATA[
# 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
]]><![CDATA[
reboot
exit]]></screen></article>