Skip to content

Commit

Permalink
qosify: add missing alias support in the init script
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Nov 14, 2021
1 parent e7d0dce commit 9bd9e04
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions package/network/config/qosify/files/qosify.init
Expand Up @@ -71,6 +71,20 @@ add_interface() {
json_close_object
}

add_alias() {
local cfg="$1"

config_get value "$cfg" value
config_get ingress "$cfg" ingress
config_get egress "$cfg" egress

json_add_array "$cfg"
json_add_string ingress "${ingress:-$value}"
json_add_string egress "${egress:-$value}"
json_close_array
}


reload_service() {
json_init

Expand All @@ -82,6 +96,10 @@ reload_service() {
config_foreach add_interface interface
json_close_object

json_add_object aliases
config_foreach add_alias alias
json_close_object

json_add_object devices
config_foreach add_interface device
json_close_object
Expand Down

0 comments on commit 9bd9e04

Please sign in to comment.