mirror of
https://github.com/openwrt/packages.git
synced 2025-12-24 08:28:20 +04:00
nft-qos: Update init script
This replaces the use of uci_validate_section() with uci_load_validate(), which removes the need to declare local variables for every config option. This also adds a validate section to service_triggers(), and fixes some variable name typos in qosdef_init_static(). Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
@@ -14,6 +14,12 @@ USE_PROCD=1
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger nft-qos
|
||||
|
||||
procd_open_validate
|
||||
qosdef_validate_dynamic
|
||||
qosdef_validate_static
|
||||
qosdef_validate_priority
|
||||
procd_close_validate
|
||||
}
|
||||
|
||||
start_service() {
|
||||
@@ -26,9 +32,9 @@ start_service() {
|
||||
|
||||
qosdef_init_header
|
||||
qosdef_init_monitor
|
||||
qosdef_init_dynamic
|
||||
qosdef_init_static
|
||||
qosdef_init_priority
|
||||
qosdef_validate_dynamic default qosdef_init_dynamic
|
||||
qosdef_validate_static default qosdef_init_static
|
||||
qosdef_validate_priority default qosdef_init_priority
|
||||
qosdef_init_done
|
||||
qosdef_start
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user