changeset 375:c40b58a07d3e

Fix ADAPTATION to default switch setup.
author ray@terran.dlink.ua
date Wed, 07 Mar 2012 13:15:03 +0200
parents 82ab2bf9f038
children 338b04c13dee 9d0cd146ea5c
files boards/NorthQ/NQ-900/README boards/NorthQ/NQ-900/files/etc/rc.d/ADAPTATION
diffstat 2 files changed, 54 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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
+
+
--- /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