aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base
diff options
context:
space:
mode:
authorJames <>2013-03-17 12:16:37 +0000
committerJames <>2013-03-17 12:16:37 +0000
commit27b76ab0671089c47506615a796a261e993896a7 (patch)
tree61213d67e7fa87b20356b23798558e2c4212c42f /target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base
downloadtrunk-36060-master.tar.gz
trunk-36060-master.tar.bz2
trunk-36060-master.zip
Diffstat (limited to 'target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base')
-rw-r--r--target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base/01_leds.svn-base28
-rw-r--r--target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base/02_network.svn-base75
-rw-r--r--target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base/03_wireless-wps.svn-base16
3 files changed, 119 insertions, 0 deletions
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base/01_leds.svn-base b/target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base/01_leds.svn-base
new file mode 100644
index 0000000..3f87fe0
--- /dev/null
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base/01_leds.svn-base
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# Copyright (C) 2011 OpenWrt.org
+# based on ar71xx
+#
+
+. /lib/functions/uci-defaults.sh
+. /lib/functions/lantiq.sh
+
+[ -e "/sys/class/leds/wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0tpt"
+[ -e "/sys/class/leds/usb" ] && ucidef_set_led_usbdev "usb" "usb" "usb" "1-1"
+[ -e "/sys/class/leds/dsl" ] && ucidef_set_led_netdev "dsl" "dsl" "dsl" "pppoe-wan"
+
+for a in `ls /sys/class/leds/`; do
+ grep -q "\[none\]" /sys/class/leds/$a/trigger
+ [ $? -eq 0 ] && ucidef_set_led_default $a $a $a `cat /sys/class/leds/$a/brightness`
+done
+
+board=$(lantiq_board_id)
+
+case "$board" in
+*)
+ ;;
+esac
+
+ucidef_commit_leds
+
+exit 0
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base/02_network.svn-base b/target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base/02_network.svn-base
new file mode 100644
index 0000000..1eadb56
--- /dev/null
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base/02_network.svn-base
@@ -0,0 +1,75 @@
+#!/bin/sh
+#
+# Copyright (C) 2011-2012 OpenWrt.org
+#
+
+[ -e /etc/config/network ] && exit 0
+
+set_atm_wan() {
+ local vpi=$1
+ local vci=$2
+ local encaps=$3
+ local payload=$4
+ uci batch <<EOF
+set network.atm='atm-bridge'
+set network.atm.vpi='$vpi'
+set network.atm.vci='$vci'
+set network.atm.encaps='$encaps'
+set network.atm.payload='$payload'
+set network.wan='interface'
+set network.wan.ifname='nas0'
+set network.wan.proto='pppoe'
+set network.wan.username='foo'
+set network.wan.password='bar'
+EOF
+}
+
+. /lib/functions/uci-defaults.sh
+. /lib/functions/lantiq.sh
+
+touch /etc/config/network
+
+ucidef_set_interface_loopback
+ucidef_set_interface_lan 'eth0'
+
+vpi=1
+vci=32
+encaps="llc"
+payload="bridged"
+
+board=$(lantiq_board_id)
+
+case "$board" in
+# adm6996
+ARV4520PW)
+ ucidef_set_interface_lan "eth0.1"
+ ucidef_add_switch "eth0" "1" "1"
+ ucidef_add_switch_vlan "eth0" "1" "3 2 1 0 5t"
+ ;;
+
+ACMP252|GIGASX76X)
+ ucidef_set_interface_lan "eth0.1"
+ ucidef_add_switch "eth0" "1" "1"
+ ucidef_add_switch_vlan "eth0" "1" "4 3 2 1 5t"
+ ;;
+
+# ar8316
+ARV4519PW|ARV7518PW)
+ ucidef_set_interface_lan "eth0.1"
+ ucidef_add_switch "eth0" "1" "1"
+ ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
+ ;;
+
+WBMR)
+ ucidef_add_switch "eth0" "1" "0"
+ ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
+ ;;
+
+esac
+
+[ -z "$(ls /lib/modules/`uname -r`/ltq_atm*)" ] || set_atm_wan "$vpi" "$vci" "$encaps" "$payload"
+
+
+uci commit network
+
+exit 0
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base/03_wireless-wps.svn-base b/target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base/03_wireless-wps.svn-base
new file mode 100644
index 0000000..f2412d7
--- /dev/null
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/.svn/text-base/03_wireless-wps.svn-base
@@ -0,0 +1,16 @@
+. /lib/functions.sh
+. /lib/functions/lantiq.sh
+
+set_wps() {
+ uci set wireless.$1.wps_pushbutton=0
+ uci set wireless.$1.wps_device_name="OpenWrt - $(lantiq_board_name)"
+}
+
+board=$(lantiq_board_id)
+case $board in
+WBMR)
+ config_load wireless
+ config_foreach set_wps wifi-iface
+ uci commit wireless
+ ;;
+esac