You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
990 B

  1. #!/bin/sh /etc/rc.common
  2. #
  3. # Copyright (C) 2018 rosysong@rosinson.com
  4. #
  5. . /lib/nft-qos/core.sh
  6. . /lib/nft-qos/monitor.sh
  7. . /lib/nft-qos/dynamic.sh
  8. . /lib/nft-qos/static.sh
  9. . /lib/nft-qos/mac.sh
  10. . /lib/nft-qos/priority.sh
  11. START=99
  12. USE_PROCD=1
  13. service_triggers() {
  14. procd_add_reload_trigger nft-qos
  15. procd_open_validate
  16. qosdef_validate_dynamic
  17. qosdef_validate_static
  18. qosdef_validate_priority
  19. qosdef_validate_mac
  20. procd_close_validate
  21. }
  22. start_service() {
  23. config_load nft-qos
  24. qosdef_init_env
  25. qosdef_flush_mac
  26. qosdef_flush_static
  27. qosdef_flush_dynamic
  28. qosdef_remove_priority
  29. qosdef_init_header
  30. qosdef_init_monitor
  31. qosdef_validate_dynamic default qosdef_init_dynamic
  32. qosdef_validate_static default qosdef_init_static
  33. qosdef_validate_mac default qosdef_init_mac
  34. qosdef_validate_priority default qosdef_init_priority
  35. qosdef_init_done
  36. qosdef_start
  37. }
  38. stop_service() {
  39. qosdef_flush_dynamic
  40. qosdef_flush_static
  41. qosdef_flush_mac
  42. qosdef_remove_priority
  43. qosdef_clean_cache
  44. }