From 560c530e279fb8ed2a4a23ba371a83870aacb71a Mon Sep 17 00:00:00 2001 From: jow Date: Fri, 18 Jan 2013 12:42:53 +0000 Subject: all targets: use numerically prefixed uci-defaults file names to better control order of execution git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35217 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../lantiq/base-files/etc/uci-defaults/01_leds | 28 ++++++++ .../lantiq/base-files/etc/uci-defaults/02_network | 75 ++++++++++++++++++++++ .../base-files/etc/uci-defaults/03_wireless-wps | 16 +++++ .../linux/lantiq/base-files/etc/uci-defaults/leds | 28 -------- .../lantiq/base-files/etc/uci-defaults/network | 75 ---------------------- .../linux/lantiq/base-files/etc/uci-defaults/wps | 16 ----- 6 files changed, 119 insertions(+), 119 deletions(-) create mode 100755 target/linux/lantiq/base-files/etc/uci-defaults/01_leds create mode 100755 target/linux/lantiq/base-files/etc/uci-defaults/02_network create mode 100644 target/linux/lantiq/base-files/etc/uci-defaults/03_wireless-wps delete mode 100755 target/linux/lantiq/base-files/etc/uci-defaults/leds delete mode 100755 target/linux/lantiq/base-files/etc/uci-defaults/network delete mode 100644 target/linux/lantiq/base-files/etc/uci-defaults/wps (limited to 'target/linux/lantiq') diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds new file mode 100755 index 000000000..3f87fe075 --- /dev/null +++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds @@ -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/02_network b/target/linux/lantiq/base-files/etc/uci-defaults/02_network new file mode 100755 index 000000000..db5b58e97 --- /dev/null +++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network @@ -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 <