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.

54 lines
1.0 KiB

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