[Zrouter-src] ZRouter.org: push to ZRouter boards/NorthQ/NQ-900/README boards/...

zrouter-src at zrouter.org zrouter-src at zrouter.org
Wed Mar 7 11:14:38 UTC 2012


details:   http://zrouter.org/hg/zrouter//rev/c40b58a07d3e
changeset: 375:c40b58a07d3e
user:      ray at terran.dlink.ua
date:      Wed Mar 07 13:15:03 2012 +0200
description:
Fix ADAPTATION to default switch setup.

diffstat:

 boards/NorthQ/NQ-900/README                    |   8 ++++
 boards/NorthQ/NQ-900/files/etc/rc.d/ADAPTATION |  46 ++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 0 deletions(-)

diffs (63 lines):

diff -r 82ab2bf9f038 -r c40b58a07d3e boards/NorthQ/NQ-900/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/NorthQ/NQ-900/README	Wed Mar 07 13:15:03 2012 +0200
@@ -0,0 +1,8 @@
+
+CFI
+
+Flashing using console cable and TFTP
+ifconfig eth0 -addr=192.168.0.89 -mask=255.255.255.0
+flash -noheader 192.168.0.90:/NQ-900/NorthQ_NQ-900.trx flash1.trx
+
+
diff -r 82ab2bf9f038 -r c40b58a07d3e boards/NorthQ/NQ-900/files/etc/rc.d/ADAPTATION
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/NorthQ/NQ-900/files/etc/rc.d/ADAPTATION	Wed Mar 07 13:15:03 2012 +0200
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# PROVIDE: ADAPTATION
+
+. /etc/rc.subr
+. /etc/network.subr
+
+name="ADAPTATION"
+start_cmd="adapt_start"
+start_precmd="adapt_prestart"
+start_postcmd="adapt_poststart"
+stop_cmd="adapt_stop"
+
+adapt_prestart()
+{
+	# Import MAC addresses with known names
+	kenv LAN_MAC_ADDR=`kenv et0macaddr`
+	kenv WAN_MAC_ADDR=`kenv et0macaddr`
+	kenv WLAN_MAC_ADDR=`kenv il0macaddr`
+
+	ifconfig bfe0 name lan0
+	ifconfig vlan0 create vlandev lan0 vlan 1
+	ifconfig vlan0 name wan0
+
+	ifconfig lan0 ether `kenv LAN_MAC_ADDR`
+	ifconfig wan0 ether `kenv WAN_MAC_ADDR`
+
+	hostname `sysctl -n kern.ident`
+
+}
+
+adapt_start()
+{
+}
+
+adapt_poststart()
+{
+}
+
+adapt_stop()
+{
+}
+
+load_rc_config $name
+
+run_rc_command $*
\ No newline at end of file


More information about the Zrouter-src mailing list