base-files: move uci_set_poe() to uci-defaults.sh
PoE devices in the realtek target have the possibility to add PSE info to the board description via 02_network. Make this available for all targets, by moving the uci_set_poe() function to the globally available uci-default.sh script. Signed-off-by: Sander Vanheule <sander@svanheule.net>
This commit is contained in:
parent
7cbfe5654d
commit
6f83a708c8
2 changed files with 11 additions and 11 deletions
|
@ -654,6 +654,17 @@ ucidef_set_ntpserver() {
|
||||||
json_select ..
|
json_select ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ucidef_set_poe() {
|
||||||
|
json_select_object poe
|
||||||
|
json_add_string "budget" "$1"
|
||||||
|
json_select_array ports
|
||||||
|
for port in $2; do
|
||||||
|
json_add_string "" "$port"
|
||||||
|
done
|
||||||
|
json_select ..
|
||||||
|
json_select ..
|
||||||
|
}
|
||||||
|
|
||||||
ucidef_add_wlan() {
|
ucidef_add_wlan() {
|
||||||
local path="$1"; shift
|
local path="$1"; shift
|
||||||
|
|
||||||
|
|
|
@ -3,17 +3,6 @@
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
ucidef_set_poe() {
|
|
||||||
json_select_object poe
|
|
||||||
json_add_string "budget" "$1"
|
|
||||||
json_select_array ports
|
|
||||||
for port in $2; do
|
|
||||||
json_add_string "" "$port"
|
|
||||||
done
|
|
||||||
json_select ..
|
|
||||||
json_select ..
|
|
||||||
}
|
|
||||||
|
|
||||||
_filter_port_list_ordered() {
|
_filter_port_list_ordered() {
|
||||||
local ports="$1"
|
local ports="$1"
|
||||||
local excluded="$2"
|
local excluded="$2"
|
||||||
|
|
Loading…
Reference in a new issue