aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files/etc/uci-defaults
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2012-12-15 02:01:00 +0000
committerJohn Crispin <john@openwrt.org>2012-12-15 02:01:00 +0000
commit1dece11487e937deb4691f73545c1403d018421d (patch)
tree4a2e99f213629991d7a9520a3408028e3b42f9b3 /target/linux/lantiq/base-files/etc/uci-defaults
parent601bc28669719c8ef004e108cb0bc9e5c784412e (diff)
downloadupstream-1dece11487e937deb4691f73545c1403d018421d.tar.gz
upstream-1dece11487e937deb4691f73545c1403d018421d.tar.bz2
upstream-1dece11487e937deb4691f73545c1403d018421d.zip
cleanup basefiles
SVN-Revision: 34698
Diffstat (limited to 'target/linux/lantiq/base-files/etc/uci-defaults')
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/uci-defaults/leds52
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/uci-defaults/network32
2 files changed, 18 insertions, 66 deletions
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/leds b/target/linux/lantiq/base-files/etc/uci-defaults/leds
index 64b080f33b..747a715044 100755
--- a/target/linux/lantiq/base-files/etc/uci-defaults/leds
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/leds
@@ -5,51 +5,21 @@
#
. /lib/functions/uci-defaults.sh
-. /lib/lantiq.sh
+. /lib/functions/lantiq.sh
-board=$(lantiq_board_name)
+[ -e "/sys/class/leds/wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0tx"
+[ -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"
-case "$board" in
-ARV4520PW|ARV452CPW)
- ucidef_set_led_netdev "wifi" "wifi" "soc:blue:wifi" "wlan0"
- ucidef_set_led_usbdev "usb" "USB" "soc:blue:usb" "1-1"
- ucidef_set_led_default "fxs1" "fxs1" "soc:blue:fxs1" "1"
- ucidef_set_led_default "fxs2" "fxs2" "soc:blue:fxs2" "1"
- ucidef_set_led_default "online" "online" "soc:blue:internet" "1"
- ;;
-
-ARV7525PW)
- ucidef_set_led_netdev "wifi" "wifi" "soc:green:wifi" "wlan0"
- ucidef_set_led_default "fxs1" "fxs1" "soc:green:fxs1" "1"
- ucidef_set_led_default "fxs2" "fxs2" "soc:green:fxs2" "1"
- ucidef_set_led_default "dsl" "dsl" "soc:red:dsl" "1"
- ucidef_set_led_default "online" "online" "soc:green:online" "1"
- ;;
-
-ARV4525PW)
- ucidef_set_led_netdev "wifi" "wifi" "soc:green:wifi" "wlan0"
- ucidef_set_led_default "fxs1" "fxs1" "soc:green:fxs1" "1"
- ucidef_set_led_default "fxs2" "fxs2" "soc:green:fxs2" "1"
- ucidef_set_led_default "dsl" "dsl" "soc:green:dsl" "1"
- ucidef_set_led_default "online" "online" "soc:green:online" "1"
- ;;
+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
-GIGASX76X)
- ucidef_set_led_wlan "wifi" "wifi" "soc:green:wifi" "phy0radio"
- ucidef_set_led_netdev "online" "online" "soc:green:online" "pppoe-wan"
- ucidef_set_led_usbdev "usb" "USB" "soc:green:usb" "1-1"
- ;;
+board=$(lantiq_board_id)
-ARV4519PW)
- ucidef_set_led_wlan "wifi" "wifi" "soc:green:wifi" "phy0radio"
- ucidef_set_led_netdev "internet" "internet" "soc:green:internet" "pppoe-wan"
- ucidef_set_led_usbdev "usb" "USB" "soc:green:usb" "1-1"
- ;;
-
-ARV7518PW)
- ucidef_set_led_wlan "wifi" "wifi" "soc:green:wifi" "phy0radio"
- ucidef_set_led_netdev "internet" "internet" "soc:green:internet" "pppoe-wan"
- ucidef_set_led_usbdev "usb" "USB" "soc:green:usb" "1-1"
+case "$board" in
+*)
;;
esac
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/network b/target/linux/lantiq/base-files/etc/uci-defaults/network
index b40134d934..e1459b9fc3 100755
--- a/target/linux/lantiq/base-files/etc/uci-defaults/network
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/network
@@ -12,7 +12,6 @@ set_atm_wan() {
local payload=$4
uci batch <<EOF
set network.atm='atm-bridge'
-set network.atm.unit='0'
set network.atm.vpi='$vpi'
set network.atm.vci='$vci'
set network.atm.encaps='$encaps'
@@ -25,18 +24,8 @@ set network.wan.password='bar'
EOF
}
-set_adsl() {
- local fwannex=$1
- local annex=$2
- uci batch <<EOF
-set network.adsl='adsl-device'
-set network.adsl.fwannex='$fwannex'
-set network.adsl.annex='$annex'
-EOF
-}
-
. /lib/functions/uci-defaults.sh
-. /lib/lantiq.sh
+. /lib/functions/lantiq.sh
touch /etc/config/network
@@ -47,40 +36,33 @@ vpi=1
vci=32
encaps="llc"
payload="bridged"
-fwannex=$(lantiq_dsl_fwannex)
-board=$(lantiq_board_name)
-dsl=$(lantiq_soc_has_adsl)
+
+board=$(lantiq_board_id)
case "$board" in
-# annex B with adm6996
+# 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"
- set_adsl "b" "b2p"
;;
GIGASX76X)
ucidef_set_interface_lan "eth0.1"
ucidef_add_switch "eth0" "1" "1"
ucidef_add_switch_vlan "eth0" "1" "4 3 2 1 5t"
- set_adsl "b" "b2p"
;;
-# annex A with ar8316
+# 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"
- set_adsl "a" "a2p"
- ;;
-
-ARV7525PW|ARV4525PW|*)
- set_adsl "$fwannex" "${fwannex}2p"
;;
esac
-[ -z "$dsl" ] || set_atm_wan "$vpi" "$vci" "$encaps" "$payload"
+[ -z "$(ls /lib/modules/`uname -r`/ltq_atm*)" ] || set_atm_wan "$vpi" "$vci" "$encaps" "$payload"
+
uci commit network