mirror of
				https://github.com/openwrt/packages.git
				synced 2025-11-04 08:09:39 +00:00 
			
		
		
		
	Since 19.07, netifd will not try to bring a device up after someone brought it down. This way, there is no need to rename the device. It also fixes a rename error on 19.07 when the *_down device was being in use (by netifd?). Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
		
			
				
	
	
		
			42 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
#
 | 
						|
# Copyright (C) 2018-2019 Luiz Angelo Daros de Luca
 | 
						|
#
 | 
						|
# This is free software, licensed under the GNU General Public License v2.
 | 
						|
#
 | 
						|
 | 
						|
include $(TOPDIR)/rules.mk
 | 
						|
 | 
						|
PKG_NAME:=switchdev-poller
 | 
						|
PKG_VERSION:=1.1.0
 | 
						|
PKG_RELEASE:=1
 | 
						|
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
 | 
						|
PKG_LICENSE:=GPL-2.0-or-later
 | 
						|
 | 
						|
include $(INCLUDE_DIR)/package.mk
 | 
						|
 | 
						|
define Package/switchdev-poller
 | 
						|
   SECTION:=net
 | 
						|
   CATEGORY:=Network
 | 
						|
   TITLE:=Poll switchdev ports to bring CPU ports up/down
 | 
						|
   DEPENDS:=+swconfig
 | 
						|
   PKGARCH:=all
 | 
						|
endef
 | 
						|
 | 
						|
define Package/switchdev-poller/description
 | 
						|
  This service monitors switchdev ports and brings down CPU ports when
 | 
						|
  all related non-CPU vlan ports are also down. Otherwise, it brings
 | 
						|
  the port up.
 | 
						|
endef
 | 
						|
 | 
						|
define Build/Compile
 | 
						|
endef
 | 
						|
 | 
						|
define Package/switchdev-poller/install
 | 
						|
	$(INSTALL_DIR) $(1)/etc/init.d
 | 
						|
	$(INSTALL_BIN) ./files/switchdev-poller.init $(1)/etc/init.d/switchdev-poller
 | 
						|
	$(INSTALL_DIR) $(1)/usr/lib/switchdev-poller
 | 
						|
	$(INSTALL_BIN) ./files/switchdev-poller $(1)/usr/lib/switchdev-poller/switchdev-poller
 | 
						|
endef
 | 
						|
 | 
						|
$(eval $(call BuildPackage,switchdev-poller))
 |