forked from Ivasoft/openwrt
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>
This commit is contained in:
@@ -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|\
|
||||
|
||||
@@ -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|\
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user