mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-06-17 04:33:57 +02:00
base-files: support "metric" in board.json
It allows prepopulating /etc/config/network interface-s with predefined metric. It may be useful for devices with multiple WAN ports. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
parent
22b7bd6b13
commit
7f443d2d9a
|
@ -96,7 +96,7 @@ generate_network() {
|
||||||
|
|
||||||
json_select network
|
json_select network
|
||||||
json_select "$1"
|
json_select "$1"
|
||||||
json_get_vars device macaddr protocol ipaddr netmask vlan
|
json_get_vars device macaddr metric protocol ipaddr netmask vlan
|
||||||
json_get_values ports ports
|
json_get_values ports ports
|
||||||
json_select ..
|
json_select ..
|
||||||
json_select ..
|
json_select ..
|
||||||
|
@ -154,6 +154,7 @@ generate_network() {
|
||||||
set network.$1='interface'
|
set network.$1='interface'
|
||||||
set network.$1.type='$type'
|
set network.$1.type='$type'
|
||||||
set network.$1.device='$device'
|
set network.$1.device='$device'
|
||||||
|
set network.$1.metric='$metric'
|
||||||
set network.$1.proto='none'
|
set network.$1.proto='none'
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user