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.

58 lines
1.4 KiB

nft-qos: fix useless log in syslog Since the functions in procd.sh invoke "initscript" variable which is not defined when imported procd.sh from hotplug scripts. And this results in error when calling basename utility. Sun Jan 20 12:34:50 2019 daemon.debug dnsmasq-script[15340]: BusyBox v1.28.4 () multi-call binary. Sun Jan 20 12:34:50 2019 daemon.debug dnsmasq-script[15340]: Sun Jan 20 12:34:50 2019 daemon.debug dnsmasq-script[15340]: Usage: basename FILE [SUFFIX] Sun Jan 20 12:34:50 2019 daemon.debug dnsmasq-script[15340]: Sun Jan 20 12:34:50 2019 daemon.debug dnsmasq-script[15340]: Strip directory path and .SUFFIX from FILE Sun Jan 20 12:34:50 2019 user.notice nft-qos-monitor: ACTION=update, MACADDR=xxxxxx, IPADDR=192.168.11.109, HOSTNAME=Honor_Play Sun Jan 20 12:34:50 2019 daemon.info dnsmasq[15340]: 250 192.168.11.109/60566 reply www.google.com is 216.58.215.68 Sun Jan 20 12:34:50 2019 daemon.info dnsmasq[15340]: 251 192.168.11.109/43456 reply mtalk.google.com is <CNAME> Sun Jan 20 12:34:50 2019 daemon.info dnsmasq[15340]: 251 192.168.11.109/43456 reply mobile-gtalk.l.google.com is 173.194.222.188 Sun Jan 20 12:34:50 2019 daemon.debug dnsmasq-script[15340]: BusyBox v1.28.4 () multi-call binary. Sun Jan 20 12:34:50 2019 daemon.debug dnsmasq-script[15340]: Sun Jan 20 12:34:50 2019 daemon.debug dnsmasq-script[15340]: Usage: basename FILE [SUFFIX] Sun Jan 20 12:34:50 2019 daemon.debug dnsmasq-script[15340]: Sun Jan 20 12:34:50 2019 daemon.debug dnsmasq-script[15340]: Strip directory path and .SUFFIX from FILE Sun Jan 20 12:34:51 2019 daemon.debug dnsmasq-script[15340]: BusyBox v1.28.4 () multi-call binary. Sun Jan 20 12:34:51 2019 daemon.debug dnsmasq-script[15340]: Sun Jan 20 12:34:51 2019 daemon.debug dnsmasq-script[15340]: Usage: basename FILE [SUFFIX] Sun Jan 20 12:34:51 2019 daemon.debug dnsmasq-script[15340]: Sun Jan 20 12:34:51 2019 daemon.debug dnsmasq-script[15340]: Strip directory path and .SUFFIX from FILE Sun Jan 20 12:34:51 2019 user.notice nft-qos-dynamic: ACTION=update, MACADDR=xxxxxx, IPADDR=192.168.11.109, HOSTNAME=Honor_Play Signed-off-by: Rosy Song <rosysong@rosinson.com>
6 years ago
  1. #
  2. # Copyright (C) 2018 rosysong@rosinson.com
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=nft-qos
  9. PKG_VERSION:=1.0.4
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_MAINTAINER:=Rosy Song <rosysong@rosinson.com>
  13. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  14. include $(INCLUDE_DIR)/package.mk
  15. define Package/nft-qos
  16. SECTION:=utils
  17. CATEGORY:=Base system
  18. DEPENDS:=+nftables +kmod-nft-netdev +kmod-nft-bridge
  19. TITLE:=QoS scripts over nftables
  20. endef
  21. define Package/nft-qos/description
  22. This package provides implementation for qos over nftables.
  23. Currently, static/dynamic qos and traffic shaping are supported.
  24. endef
  25. define Package/nft-qos/conffiles
  26. /etc/config/nft-qos
  27. endef
  28. define Build/Prepare
  29. endef
  30. define Build/Configure
  31. endef
  32. define Build/Compile
  33. endef
  34. define Package/nft-qos/install
  35. $(INSTALL_DIR) $(1)/lib/nft-qos
  36. $(INSTALL_DATA) ./files/lib/* $(1)/lib/nft-qos/
  37. $(INSTALL_DIR) $(1)/etc/config
  38. $(INSTALL_CONF) ./files/nft-qos.config $(1)/etc/config/nft-qos
  39. $(INSTALL_DIR) $(1)/etc/init.d
  40. $(INSTALL_BIN) ./files/nft-qos.init $(1)/etc/init.d/nft-qos
  41. $(INSTALL_DIR) $(1)/etc/hotplug.d/dhcp
  42. $(INSTALL_BIN) ./files/nft-qos-monitor.hotplug $(1)/etc/hotplug.d/dhcp/00-nft-qos-monitor
  43. $(INSTALL_BIN) ./files/nft-qos-dynamic.hotplug $(1)/etc/hotplug.d/dhcp/01-nft-qos-dynamic
  44. endef
  45. $(eval $(call BuildPackage,nft-qos))