topologyd package

This commit is contained in:
Jakob Olsson 2018-08-21 10:08:24 +02:00 committed by Jakob Olsson
parent ac59ef0a8a
commit 6ee5fd0dc8
5 changed files with 134 additions and 0 deletions

37
topologyd/Makefile Normal file
View file

@ -0,0 +1,37 @@
#
# Copyright (C) 2013 Inteno
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=topologyd
PKG_VERSION:=0.1
PKG_SOURCE_VERSION:=066b5ee7e6dfb3618f03680c6dc094f3d97dce3c
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@public.inteno.se:topologyd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/topologyd
CATEGORY:=Utilities
DEPENDS:=+libubox +ubus +libpthread +libopenssl
TITLE:=topology daemon
endef
define Package/topologyd/description
gathers topology information and presents it as json structure
endef
#define Package/topologyd/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/topologyd $(1)/sbin/
endef
$(eval $(call BuildPackage,topologyd))

View file

@ -0,0 +1,2 @@
config topologyd topologyd
option debug 1

View file

@ -0,0 +1,32 @@
#!/bin/sh /etc/rc.common
START=14
STOP=96
USE_PROCD=1
start_service() {
procd_open_instance
config_load topologyd
config_get debug topologyd debug 0
procd_set_param command "/sbin/topologyd"
if [ "$debug" -gt 0 ]
then
procd_append_param command --debug "$debug"
fi
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
service_triggers()
{
procd_add_reload_trigger topologyd
}
reload_service() {
stop
start
}

34
topologyd/mdmngr Executable file
View file

@ -0,0 +1,34 @@
#!/bin/sh /etc/rc.common
START=14
STOP=96
USE_PROCD=1
NAME=dongled
start_service() {
procd_open_instance
config_load mdmngr
config_get debug mdmngr debug 0
procd_set_param command "/sbin/mdmngr"
# procd_append_param command --debug "$debug"
if [ "$debug" -gt 0 ]
then
procd_append_param command --debug "$debug"
fi
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
service_triggers()
{
procd_add_reload_trigger mdmngr
}
reload_service() {
stop
start
}

29
topologyd/oldmake Normal file
View file

@ -0,0 +1,29 @@
#
# Copyright (C) 2018 Inteno
#
include $(TOPDIR)/rules.mk
PKG_NAME:=topologyd
PKG_VERSION:=0.1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/topologyd
CATEGORY:=Utilities
DEPENDS:=+libuci +libubox +ubus +libpthread +TARGET_iopsys_ramips:swconfig +TARGET_iopsys_ramips:libnl-tiny +libopenssl
TITLE:=router topology daemon
endef
#define Build/Compile
# $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/topologyd $(PKG_BUILD_DIR)/topologyd.c $(TARGET_LDFLAGS)
#endef
define Package/topologyd/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/topologyd $(1)/sbin/
endef
$(eval $(call BuildPackage,topologyd))