[Zrouter-src] ZRouter.org: push to ZRouter boards/D-Link/DSR-500/files/etc/rc....

zrouter-src at zrouter.org zrouter-src at zrouter.org
Fri Jan 27 09:04:26 UTC 2012


details:   http://zrouter.org/hg/zrouter//rev/18e08002dd6e
changeset: 332:18e08002dd6e
user:      ray at terran.dlink.ua
date:      Fri Jan 27 11:04:32 2012 +0200
description:
Add ADAPTATION rc.d script, that only rename ifaces for now

diffstat:

 boards/D-Link/DSR-500/files/etc/rc.d/ADAPTATION |  75 +++++++++++++++++++++++++
 1 files changed, 75 insertions(+), 0 deletions(-)

diffs (80 lines):

diff -r 4a7752e2026f -r 18e08002dd6e boards/D-Link/DSR-500/files/etc/rc.d/ADAPTATION
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boards/D-Link/DSR-500/files/etc/rc.d/ADAPTATION	Fri Jan 27 11:04:32 2012 +0200
@@ -0,0 +1,75 @@
+#!/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()
+{
+#	switchctl /dev/switch0 set vlan 0 vid 1
+#	switchctl /dev/switch0 set vlan 0 add 0 u
+#	switchctl /dev/switch0 set vlan 0 add 1 u
+#	switchctl /dev/switch0 set vlan 0 add 2 u
+#	switchctl /dev/switch0 set vlan 0 add 3 u
+#	switchctl /dev/switch0 set vlan 0 del 4
+#	switchctl /dev/switch0 set vlan 0 add 5 t
+#	switchctl /dev/switch0 set vlan 0 add 6 t
+#
+#	switchctl /dev/switch0 set vlan 1 vid 2
+#	switchctl /dev/switch0 set vlan 1 del 0
+#	switchctl /dev/switch0 set vlan 1 del 1
+#	switchctl /dev/switch0 set vlan 1 del 2
+#	switchctl /dev/switch0 set vlan 1 del 3
+#	switchctl /dev/switch0 set vlan 1 add 4 u
+#	switchctl /dev/switch0 set vlan 1 add 5 t
+#	switchctl /dev/switch0 set vlan 1 add 6 t
+#
+#	switchctl /dev/switch0 set port 0 pvid 1 flags Untag
+#	switchctl /dev/switch0 set port 1 pvid 1 flags Untag
+#	switchctl /dev/switch0 set port 2 pvid 1 flags Untag
+#	switchctl /dev/switch0 set port 3 pvid 1 flags Untag
+#	switchctl /dev/switch0 set port 4 pvid 2 flags Untag
+#
+#	switchctl /dev/switch0 set port 5 pvid 1 flags Tag
+#	switchctl /dev/switch0 set port 6 pvid 1 flags Tag
+
+#	gpioctl -f /dev/gpioc0 -c 10 IN II PU INT
+
+	# Import MAC addresses with known names
+#	kenv LAN_MAC_ADDR=`kenv ethaddr`
+#	kenv WAN_MAC_ADDR=`kenv wanmac`
+
+	ifconfig octe0 name lan0
+	ifconfig octe1 name lan1 # While i fixing switch for it
+	ifconfig octe2 name wan0
+
+#	ifconfig lan0 ether `kenv LAN_MAC_ADDR`
+#	ifconfig wan0 ether `kenv WAN_MAC_ADDR`
+
+#	hostname `kenv HostName`
+	hostname DSR-500
+
+}
+
+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