From 608dfd532a01cd9f7cb11cc8864dfff3074297c3 Mon Sep 17 00:00:00 2001 From: Jakob Olsson Date: Wed, 29 May 2019 10:47:29 +0200 Subject: [PATCH] owsd: add uproxyd --- owsd/Config.in | 12 ++++++++++-- owsd/Makefile | 12 ++++++++---- owsd/files/owsd.init | 14 +++++++++----- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/owsd/Config.in b/owsd/Config.in index 8ee214ff8..fca9394f9 100644 --- a/owsd/Config.in +++ b/owsd/Config.in @@ -1,9 +1,9 @@ choice - prompt "Select Bus" + prompt "Select IPC Bus" default OWSD_USE_UBUS depends on PACKAGE_owsd help - Select which bus to compile owsd for + Select which IPC bus to compile owsd for config OWSD_USE_DBUS bool "Use DBUS" @@ -15,3 +15,11 @@ config OWSD_USE_DBUS_UBUS bool "Use UBUS and DBUS" endchoice + +config OWSD_UPROXYD + bool "Enable UBUS Proxy Daemon" + default y if OWSD_USE_UBUS || OWSD_USE_DBUS_UBUS + help + Enabling uproxyd automates detection of other + UBUS-X enabled devices in the network + diff --git a/owsd/Makefile b/owsd/Makefile index 1bfca791f..77db6a63e 100644 --- a/owsd/Makefile +++ b/owsd/Makefile @@ -5,25 +5,27 @@ include $(TOPDIR)/rules.mk PKG_NAME:=owsd -PKG_VERSION:=1.1.1 +PKG_VERSION:=1.1.2 PKG_RELEASE:=1 PKG_SOURCE_PROTO=git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/owsd.git -PKG_SOURCE_VERSION:=f0eedeb6fd061edf3784d6bf86fa60b176bf3fe7 +PKG_SOURCE_VERSION:=930db7f4af821e91f46107c8a76b60f943ec7c3b PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION} PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_CONFIG_DEPENDS:=CONFIG_OWSD_USE_DBUS CONFIG_OWSD_USE_UBUS CONFIG_OWSD_USE_DBUS_UBUS +PKG_CONFIG_DEPENDS:=CONFIG_OWSD_USE_DBUS CONFIG_OWSD_USE_UBUS CONFIG_OWSD_USE_DBUS_UBUS CONFIG_OWSD_UPROXYD USE_UBUS-y:=-DWSD_HAVE_UBUS=ON USE_DBUS-y:=-DWSD_HAVE_DBUS=ON USE_BOTH-y:=${USE_UBUS-y} ${USE_DBUS-y} +USE_UPROXYD-y:=-DOWSD_UPROXYD=ON CMAKE_OPTIONS:=${USE_UBUS-${CONFIG_OWSD_USE_UBUS}} \ ${USE_DBUS-${CONFIG_OWSD_USE_DBUS}} \ - ${USE_BOTH-${CONFIG_OWSD_USE_DBUS_UBUS}} + ${USE_BOTH-${CONFIG_OWSD_USE_DBUS_UBUS}} \ + ${USE_UPROXYD-${CONFIG_OWSD_UPROXYD}} include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -51,6 +53,8 @@ endef define Package/owsd/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owsd $(1)/usr/bin/owsd + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/uproxyd $(1)/sbin/uproxyd $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/owsd.init $(1)/etc/init.d/owsd $(INSTALL_DIR) $(1)/etc/config diff --git a/owsd/files/owsd.init b/owsd/files/owsd.init index 9a47d510e..11eb09cb9 100644 --- a/owsd/files/owsd.init +++ b/owsd/files/owsd.init @@ -301,11 +301,15 @@ start_service() { procd_set_param respawn procd_close_instance - # Start uproxyd - procd_open_instance - procd_set_param command $UPROXYD - procd_set_param respawn - procd_close_instance + + if [ "${enable}" -eq 1 ]; then + # Start uproxyd + procd_open_instance + procd_set_param command $UPROXYD + procd_set_param respawn + procd_close_instance + fi + } #stop_service()