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.

41 lines
1.1 KiB

  1. #
  2. # Copyright (C) 2018-2019 Luiz Angelo Daros de Luca
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. #
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=switchdev-poller
  8. PKG_VERSION:=1.0.1
  9. PKG_RELEASE:=1
  10. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
  11. PKG_LICENSE:=GPL-2.0-or-later
  12. include $(INCLUDE_DIR)/package.mk
  13. define Package/switchdev-poller
  14. SECTION:=net
  15. CATEGORY:=Network
  16. TITLE:=Poll switchdev ports to bring CPU ports up/down
  17. DEPENDS:=+swconfig
  18. PKGARCH:=all
  19. endef
  20. define Package/switchdev-poller/description
  21. This service monitors switchdev ports and brings down CPU ports when
  22. all related non-CPU vlan ports are also down. Otherwise, it brings
  23. the port up.
  24. endef
  25. define Build/Compile
  26. endef
  27. define Package/switchdev-poller/install
  28. $(INSTALL_DIR) $(1)/etc/init.d
  29. $(INSTALL_BIN) ./files/switchdev-poller.init $(1)/etc/init.d/switchdev-poller
  30. $(INSTALL_DIR) $(1)/usr/lib/switchdev-poller
  31. $(INSTALL_BIN) ./files/switchdev-poller $(1)/usr/lib/switchdev-poller/switchdev-poller
  32. endef
  33. $(eval $(call BuildPackage,switchdev-poller))