aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files/etc/uci-defaults
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-05-12 22:36:07 +0200
committerMathias Kresin <dev@kresin.me>2017-07-15 23:13:34 +0200
commitf12a32630ff52b5e13397f64e9fb31708e97fb60 (patch)
tree46db1bb2606e05b40aaf2e43e7468531fa8df7b6 /target/linux/ar71xx/base-files/etc/uci-defaults
parentced05ca9e092817f2f4d4fe25c5c56700838a3ad (diff)
downloadupstream-f12a32630ff52b5e13397f64e9fb31708e97fb60.tar.gz
upstream-f12a32630ff52b5e13397f64e9fb31708e97fb60.tar.bz2
upstream-f12a32630ff52b5e13397f64e9fb31708e97fb60.zip
treewide: use the generic board_name function
Use the generic function instead ot the target specific ones. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/ar71xx/base-files/etc/uci-defaults')
-rw-r--r--target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration8
-rw-r--r--target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration4
-rw-r--r--target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum4
-rw-r--r--target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-seama-header4
4 files changed, 8 insertions, 12 deletions
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration b/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
index a99a4ec0b4..338a22297b 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
@@ -5,6 +5,8 @@
SWITCH_NAME_CHANGED=
+. /lib/functions.sh
+
do_change_switch_name() {
local config="$1"
local option=$2
@@ -25,8 +27,6 @@ migrate_switch_name() {
local oldname=$1
local newname=$2
- . /lib/functions.sh
-
config_load network
logger -t migrate-switchX "Updating switch names in network configuration"
@@ -40,9 +40,7 @@ migrate_switch_name() {
}
}
-. /lib/ar71xx.sh
-
-board=$(ar71xx_board_name)
+board=$(board_name)
case "$board" in
dir-825-c1|\
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration b/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration
index 16722d1ab2..d6f7077093 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration
@@ -41,9 +41,7 @@ migrate_leds()
config_foreach do_led_update_sysfs led "$@"
}
-. /lib/ar71xx.sh
-
-board=$(ar71xx_board_name)
+board=$(board_name)
case "$board" in
dhp-1565-a1|\
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum b/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
index 057afe0193..2d1afb11cb 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
@@ -3,9 +3,9 @@
# Copyright (C) 2010 OpenWrt.org
#
-. /lib/ar71xx.sh
+. /lib/functions.sh
-board=$(ar71xx_board_name)
+board=$(board_name)
fixtrx() {
mtd -o 32 fixtrx firmware
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-seama-header b/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-seama-header
index ebe9c1c90f..b3857ef07f 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-seama-header
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-seama-header
@@ -1,6 +1,6 @@
#!/bin/sh
-. /lib/ar71xx.sh
+. /lib/functions.sh
fix_seama_header() {
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
@@ -8,7 +8,7 @@ fix_seama_header() {
[ "$kernel_size" ] && mtd -c 0x$kernel_size fixseama firmware
}
-board=$(ar71xx_board_name)
+board=$(board_name)
case "$board" in
dir-869-a1)