aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2021-11-14 19:35:52 +0100
committerFelix Fietkau <nbd@nbd.name>2021-11-14 19:36:34 +0100
commit9bd9e04b6fe7e427a5d90ccbb186c2727767a756 (patch)
treefc5a579461b6d308af7b29bb4055893f224c260a
parente7d0dce2b3cf49184e0d9d61c184f1073e61791a (diff)
downloadupstream-9bd9e04b6fe7e427a5d90ccbb186c2727767a756.tar.gz
upstream-9bd9e04b6fe7e427a5d90ccbb186c2727767a756.tar.bz2
upstream-9bd9e04b6fe7e427a5d90ccbb186c2727767a756.zip
qosify: add missing alias support in the init script
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--package/network/config/qosify/files/qosify.init18
1 files changed, 18 insertions, 0 deletions
diff --git a/package/network/config/qosify/files/qosify.init b/package/network/config/qosify/files/qosify.init
index 5928630dc0..040266cc32 100644
--- a/package/network/config/qosify/files/qosify.init
+++ b/package/network/config/qosify/files/qosify.init
@@ -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
@@ -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