view boards/D-Link/DIR-632/files/etc/rc.d/ADAPTATION @ 183:0b8aef9f486e

DIR-632(Atheros AR7242) support
author ray@terran.dlink.ua
date Thu, 07 Jul 2011 17:54:55 +0300
parents
children d94b4723f2d5
line wrap: on
line source
#!/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 arge0 name lan0
	ifconfig arge1 name wan0

	ifconfig lan0 ether `kenv LAN_MAC_ADDR`
	ifconfig wan0 ether `kenv WAN_MAC_ADDR`

	hostname `kenv HostName`

}

adapt_start()
{
}

adapt_poststart()
{
}

adapt_stop()
{
}

load_rc_config $name

run_rc_command $*