aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-08-18 13:09:20 +0000
committerJohn Crispin <blogic@openwrt.org>2014-08-18 13:09:20 +0000
commitda5540a0f0881337d34963cc41fc4a1a45137e7e (patch)
tree46e4b675c6932c059e3e7be0ec02d6cfc6fbdd5b /target/linux
parentd5a9dd2b5811488f3c71dc69d4a4a84f46b62dc3 (diff)
downloadmaster-187ad058-da5540a0f0881337d34963cc41fc4a1a45137e7e.tar.gz
master-187ad058-da5540a0f0881337d34963cc41fc4a1a45137e7e.tar.bz2
master-187ad058-da5540a0f0881337d34963cc41fc4a1a45137e7e.zip
ramips: make use of the new board detection layer
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42186 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/01_leds (renamed from target/linux/ramips/base-files/etc/uci-defaults/01_leds)13
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network (renamed from target/linux/ramips/base-files/etc/uci-defaults/02_network)11
2 files changed, 11 insertions, 13 deletions
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 00207291a7..3e0a2bca4b 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -1,6 +1,6 @@
#!/bin/sh
-. /lib/functions/uci-defaults.sh
+. /lib/functions/uci-defaults-new.sh
. /lib/ramips.sh
set_usb_led() {
@@ -11,8 +11,11 @@ set_wifi_led() {
ucidef_set_led_netdev "wifi_led" "wifi" "$1" "wlan0"
}
+
board=$(ramips_board_name)
+board_config_update
+
case $board in
3g-6200n)
set_wifi_led "edimax:amber:wlan"
@@ -167,15 +170,15 @@ case $board in
hg255d)
set_wifi_led "hg255d:wlan"
set_usb_led "hg255d:usb"
- ucidef_set_led_netdev "eth" "Internet" "hg255d:internet" "eth0.2"
+ ucidef_set_led_interface "lan" "hg255d:internet"
;;
wnce2001)
set_wifi_led "netgear:green:wlan"
;;
rt-n14u)
ucidef_set_led_default "power" "power" "asus:blue:power" "1"
- ucidef_set_led_netdev "lan" "lan" "asus:blue:lan" "eth0.1"
- ucidef_set_led_netdev "wan" "wan" "asus:blue:wan" "eth0.2"
+ ucidef_set_led_interafce "lan" "asus:blue:lan"
+ ucidef_set_led_netdev "wan" "asus:blue:wan"
set_wifi_led "asus:blue:air"
set_usb_led "asus:blue:usb"
;;
@@ -207,6 +210,6 @@ case $board in
;;
esac
-ucidef_commit_leds
+board_config_flush
exit 0
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 95e728cec7..7857aca481 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -2,7 +2,7 @@
. /lib/functions.sh
. /lib/ramips.sh
-. /lib/functions/uci-defaults.sh
+. /lib/functions/uci-defaults-new.sh
. /lib/functions/system.sh
ramips_setup_rt3x5x_vlans()
@@ -299,15 +299,10 @@ ramips_setup_macs()
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr wan $wan_mac
}
-[ -e /etc/config/network ] && exit 0
-
-touch /etc/config/network
-
+board_config_update
board=$(ramips_board_name)
-
ramips_setup_interfaces $board
ramips_setup_macs $board
-
-uci commit network
+board_config_flush
exit 0