From 7d9367ade04973cdfbe2c52dcf64ae5a96b438ff Mon Sep 17 00:00:00 2001 From: Vasily Evseenko Date: Mon, 23 Sep 2024 13:29:38 +0300 Subject: [PATCH] Fix openwrt sysupgrade usage --- openwrt/net/wfb-ng-full/Makefile | 5 +++++ openwrt/net/wfb-ng-full/files/wfb-ng.init | 12 ------------ openwrt/net/wfb-ng/Makefile | 4 ++++ openwrt/net/wfb-ng/files/wfb-ng.init | 8 -------- 4 files changed, 9 insertions(+), 20 deletions(-) diff --git a/openwrt/net/wfb-ng-full/Makefile b/openwrt/net/wfb-ng-full/Makefile index a1e69d54..6ce65cea 100644 --- a/openwrt/net/wfb-ng-full/Makefile +++ b/openwrt/net/wfb-ng-full/Makefile @@ -45,6 +45,11 @@ define Package/wfb-ng-full/description receiver or transmitter with divesity. endef +define Package/wfb-ng/conffiles +/usr/sbin/wfb-ng.sh +/etc/wifibroadcast.cfg +endef + define Py3Package/wfb-ng-full/install $(INSTALL_DIR) $(1)/usr/bin $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ diff --git a/openwrt/net/wfb-ng-full/files/wfb-ng.init b/openwrt/net/wfb-ng-full/files/wfb-ng.init index 0febb96a..845e9e5a 100755 --- a/openwrt/net/wfb-ng-full/files/wfb-ng.init +++ b/openwrt/net/wfb-ng-full/files/wfb-ng.init @@ -4,23 +4,11 @@ START=99 STOP=10 USE_PROCD=1 -NAME=wfb-ng -SYSUPGRADE_CONF="/etc/sysupgrade.conf" WFB_CFG="/etc/wifibroadcast.cfg" WFB_INIT="/usr/sbin/wfb-ng.sh" WFB_SERVER="/usr/bin/wfb-server --profiles gs --cluster manual" -if [ -f $SYSUPGRADE_CONF ] && [ -x $WFB_INIT ] && ! grep -q $WFB_INIT $SYSUPGRADE_CONF -then - echo $WFB_INIT >> $SYSUPGRADE_CONF -fi - -if [ -f $SYSUPGRADE_CONF ] && [ -f $WFB_CFG ] && ! grep -q $WFB_CFG $SYSUPGRADE_CONF -then - echo $WFB_CFG >> $SYSUPGRADE_CONF -fi - start_service() { # start cluster node if [ -x $WFB_INIT ]; then diff --git a/openwrt/net/wfb-ng/Makefile b/openwrt/net/wfb-ng/Makefile index 6abee77b..8c7d42b1 100644 --- a/openwrt/net/wfb-ng/Makefile +++ b/openwrt/net/wfb-ng/Makefile @@ -34,6 +34,10 @@ define Package/wfb-ng/description standalone receiver or transmitter without diversity. endef +define Package/wfb-ng/conffiles +/usr/sbin/wfb-ng.sh +endef + define Package/wfb-ng/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/wfb_rx $(1)/usr/bin/ diff --git a/openwrt/net/wfb-ng/files/wfb-ng.init b/openwrt/net/wfb-ng/files/wfb-ng.init index 376b87be..0b71de44 100755 --- a/openwrt/net/wfb-ng/files/wfb-ng.init +++ b/openwrt/net/wfb-ng/files/wfb-ng.init @@ -4,16 +4,8 @@ START=99 STOP=10 USE_PROCD=1 -NAME=wfb-ng - -SYSUPGRADE_CONF="/etc/sysupgrade.conf" WFB_INIT="/usr/sbin/wfb-ng.sh" -if [ -f $SYSUPGRADE_CONF ] && [ -x $WFB_INIT ] && ! grep -q $WFB_INIT $SYSUPGRADE_CONF -then - echo $WFB_INIT >> $SYSUPGRADE_CONF -fi - start_service() { if [ -x $WFB_INIT ]; then procd_open_instance wfb-ng