aboutsummaryrefslogtreecommitdiffstats
path: root/package/switch/files/.svn
diff options
context:
space:
mode:
Diffstat (limited to 'package/switch/files/.svn')
-rw-r--r--package/switch/files/.svn/entries62
-rw-r--r--package/switch/files/.svn/prop-base/switch.sh.svn-base5
-rw-r--r--package/switch/files/.svn/text-base/switch.sh.svn-base53
3 files changed, 120 insertions, 0 deletions
diff --git a/package/switch/files/.svn/entries b/package/switch/files/.svn/entries
new file mode 100644
index 0000000..6628d56
--- /dev/null
+++ b/package/switch/files/.svn/entries
@@ -0,0 +1,62 @@
+10
+
+dir
+36060
+svn://svn.openwrt.org/openwrt/trunk/package/switch/files
+svn://svn.openwrt.org/openwrt
+
+
+
+2012-03-13T21:15:41.540468Z
+30937
+jow
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3c298f89-4303-0410-b956-a3cf2f4a3e73
+
+switch.sh
+file
+
+
+
+
+2013-03-17T12:13:10.000000Z
+77b0b67b3bf9504722313bf2bfb21eb7
+2012-03-13T21:15:41.540468Z
+30937
+jow
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1105
+
diff --git a/package/switch/files/.svn/prop-base/switch.sh.svn-base b/package/switch/files/.svn/prop-base/switch.sh.svn-base
new file mode 100644
index 0000000..bdbd305
--- /dev/null
+++ b/package/switch/files/.svn/prop-base/switch.sh.svn-base
@@ -0,0 +1,5 @@
+K 13
+svn:eol-style
+V 6
+native
+END
diff --git a/package/switch/files/.svn/text-base/switch.sh.svn-base b/package/switch/files/.svn/text-base/switch.sh.svn-base
new file mode 100644
index 0000000..2563d41
--- /dev/null
+++ b/package/switch/files/.svn/text-base/switch.sh.svn-base
@@ -0,0 +1,53 @@
+#!/bin/sh
+# Copyright (C) 2006-2010 OpenWrt.org
+
+setup_switch_hw() {
+ local dev="$1"
+ local enable reset evlan
+
+ config_get_bool enable "$dev" enable 1
+ config_get_bool evlan "$dev" enable_vlan 1
+ config_get_bool reset "$dev" reset 1
+
+ local proc="/proc/switch/$dev"
+ [ -d "$proc" ] && {
+ ifconfig "$dev" up
+ echo "$reset" > "$proc/reset"
+ echo "$evlan" > "$proc/enable_vlan"
+ [ -f "$proc/enable" ] && echo "$enable" > "$proc/enable"
+ }
+
+ local vlan
+ for vlan in `seq 0 15`; do
+ proc="/proc/switch/$dev/vlan/$vlan/ports"
+ [ -f "$proc" ] && echo "" > "$proc"
+ done
+}
+
+setup_switch_vlan() {
+ local s="$1"
+ local dev vlan ports
+
+ config_get dev "$s" device
+ config_get vlan "$s" vlan
+ config_get ports "$s" ports
+
+ [ -n "$dev" ] && [ -n "$vlan" ] && {
+ ports="${ports%\*}"
+
+ [ "$_vlan_pvid_set" = 1 ] || {
+ ports="$ports*"
+ _vlan_pvid_set=1
+ }
+
+ local proc="/proc/switch/$dev/vlan/$vlan/ports"
+ [ -f "$proc" ] && echo "$ports" > "$proc"
+ }
+}
+
+setup_switch() {
+ _vlan_pvid_set=0
+ config_load network
+ config_foreach setup_switch_hw switch
+ config_foreach setup_switch_vlan switch_vlan
+}