mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
ethmngr: 1.0.1 - initial version
This commit is contained in:
parent
22429269e2
commit
ed5d4e572d
2 changed files with 64 additions and 0 deletions
45
ethmngr/Makefile
Normal file
45
ethmngr/Makefile
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2020 Iopsys
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=ethmngr
|
||||||
|
PKG_VERSION:=1.0.1
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_VERSION:=9eb0f5bce7154b301966ea1e1b7addc25753b77d
|
||||||
|
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ethmngr.git
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
PKG_LICENSE:=GPL-2.0-only
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/ethmngr
|
||||||
|
SECTION:=utils
|
||||||
|
CATEGORY:=Utilities
|
||||||
|
TITLE:=Ethernet status and configration utility
|
||||||
|
DEPENDS:=+libethernet +libuci +libubox +ubus +libpthread +libnl-genl
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/ethmngr/description
|
||||||
|
This package can be used to configure and provide status about
|
||||||
|
the ethernet interfaces and ports through UBUS.
|
||||||
|
It uses APIs from the libethernet.so library.
|
||||||
|
endef
|
||||||
|
|
||||||
|
TARGET_CFLAGS += \
|
||||||
|
-I$(STAGING_DIR)/usr/include \
|
||||||
|
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||||
|
-D_GNU_SOURCE
|
||||||
|
|
||||||
|
define Package/ethmngr/install
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
|
||||||
|
$(INSTALL_BIN) ./files/ethmngr.init $(1)/etc/init.d/ethmngr
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethmngr $(1)/usr/sbin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,ethmngr))
|
||||||
19
ethmngr/files/ethmngr.init
Normal file
19
ethmngr/files/ethmngr.init
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=95
|
||||||
|
STOP=10
|
||||||
|
|
||||||
|
USE_PROCD=1
|
||||||
|
PROG=/usr/sbin/ethmngr
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
procd_open_instance
|
||||||
|
procd_set_param command ${PROG}
|
||||||
|
procd_set_param respawn
|
||||||
|
procd_close_instance
|
||||||
|
}
|
||||||
|
|
||||||
|
reload_service() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue