diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2022-09-03 14:31:29 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2022-12-01 14:53:20 +0100 |
commit | 83c70346ac89c556b5bda8bcd88b7ee93fed6d7f (patch) | |
tree | 208508cd736cd9b2e458610b565992fdff1ab967 /package | |
parent | 5167bcf2fcece09db37e0bb70e966a1ea503d028 (diff) | |
download | upstream-83c70346ac89c556b5bda8bcd88b7ee93fed6d7f.tar.gz upstream-83c70346ac89c556b5bda8bcd88b7ee93fed6d7f.tar.bz2 upstream-83c70346ac89c556b5bda8bcd88b7ee93fed6d7f.zip |
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>
(cherry picked from commit 7f443d2d9aa1170d6b68f0dc6d5b5552882ee327)
Diffstat (limited to 'package')
-rwxr-xr-x | package/base-files/files/bin/config_generate | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index 596fcf41fa..38362813d1 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -96,7 +96,7 @@ generate_network() { json_select network 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_select .. json_select .. @@ -154,6 +154,7 @@ generate_network() { set network.$1='interface' set network.$1.type='$type' set network.$1.device='$device' + set network.$1.metric='$metric' set network.$1.proto='none' EOF |