diff options
author | James <> | 2013-03-17 12:16:37 +0000 |
---|---|---|
committer | James <> | 2013-03-17 12:16:37 +0000 |
commit | 27b76ab0671089c47506615a796a261e993896a7 (patch) | |
tree | 61213d67e7fa87b20356b23798558e2c4212c42f /target/linux/lantiq/base-files/etc/uci-defaults/.svn | |
download | trunk-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')
6 files changed, 259 insertions, 0 deletions
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/.svn/entries b/target/linux/lantiq/base-files/etc/uci-defaults/.svn/entries new file mode 100644 index 0000000..dc41364 --- /dev/null +++ b/target/linux/lantiq/base-files/etc/uci-defaults/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/lantiq/base-files/etc/uci-defaults +svn://svn.openwrt.org/openwrt + + + +2013-03-12T13:52:54.702628Z +35990 +blogic + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +03_wireless-wps +file + + + + +2013-03-17T12:12:42.000000Z +b790232b1444625981b81f3302d3e8d8 +2013-01-18T12:42:53.029206Z +35217 +jow + + + + + + + + + + + + + + + + + + + + + +304 + +01_leds +file + + + + +2013-03-17T12:12:42.000000Z +ebf1017d3464bd772dcb357476cc30b5 +2013-01-18T12:42:53.029206Z +35217 +jow +has-props + + + + + + + + + + + + + + + + + + + + +630 + +02_network +file + + + + +2013-03-17T12:12:42.000000Z +81a60b0d6dad5f5ee1e7980be17e2804 +2013-03-12T13:52:54.702628Z +35990 +blogic +has-props + + + + + + + + + + + + + + + + + + + + +1397 + diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/.svn/prop-base/01_leds.svn-base b/target/linux/lantiq/base-files/etc/uci-defaults/.svn/prop-base/01_leds.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/target/linux/lantiq/base-files/etc/uci-defaults/.svn/prop-base/01_leds.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/.svn/prop-base/02_network.svn-base b/target/linux/lantiq/base-files/etc/uci-defaults/.svn/prop-base/02_network.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/target/linux/lantiq/base-files/etc/uci-defaults/.svn/prop-base/02_network.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END 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 |