From caf15f166f4ea0200794456152dc83fa8d50cdee Mon Sep 17 00:00:00 2001 From: Jason Hawks Date: Fri, 17 Nov 2023 01:30:40 -0500 Subject: [PATCH 1/5] Dont bundle config --- Makefile | 7 +------ root/etc/config/easymesh | 3 --- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 root/etc/config/easymesh diff --git a/Makefile b/Makefile index f6cbedb..66cff70 100755 --- a/Makefile +++ b/Makefile @@ -6,18 +6,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-easymesh -PKG_VERSION:=2.8.12 +PKG_VERSION:=2.8.13 PKG_RELEASE:=$(AUTORELEASE) PKG_MAINTAINER:=Jason Hawks LUCI_TITLE:=LuCI Support for easymesh LUCI_DEPENDS:= +kmod-cfg80211 +batctl-default +kmod-batman-adv +dawn +bash -# Keep the config file safe -define Package/luci-app-easymesh/conffiles -/etc/config/easymesh -endef - include $(TOPDIR)/feeds/luci/luci.mk # call BuildPackage - OpenWrt buildroot signature diff --git a/root/etc/config/easymesh b/root/etc/config/easymesh deleted file mode 100644 index 3446d21..0000000 --- a/root/etc/config/easymesh +++ /dev/null @@ -1,3 +0,0 @@ - -config easymesh 'config' - option enabled '0' From 8971d2a8d46f96e7f842653536d640ecf7d8f867 Mon Sep 17 00:00:00 2001 From: Jason Hawks Date: Fri, 17 Nov 2023 02:06:26 -0500 Subject: [PATCH 2/5] Create config if not there --- Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 66cff70..bdd2d74 100755 --- a/Makefile +++ b/Makefile @@ -6,13 +6,28 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-easymesh -PKG_VERSION:=2.8.13 +PKG_VERSION:=2.8.14 PKG_RELEASE:=$(AUTORELEASE) PKG_MAINTAINER:=Jason Hawks LUCI_TITLE:=LuCI Support for easymesh LUCI_DEPENDS:= +kmod-cfg80211 +batctl-default +kmod-batman-adv +dawn +bash +define Package/luci-app-easymesh/postinst +#!/bin/sh + +if [ ! -f /etc/config/easymesh ]; then + echo "Creating /etc/config/easymesh" + cat < /etc/config/easymesh +config easymesh 'config' + option enabled '0' +EOF + reload_config +else + echo "/etc/config/easymesh exists, skipping creation" +fi +endef + include $(TOPDIR)/feeds/luci/luci.mk # call BuildPackage - OpenWrt buildroot signature From c5e29845e4c9290c3511ac57955209ad5a522716 Mon Sep 17 00:00:00 2001 From: Jason Hawks Date: Fri, 17 Nov 2023 02:14:46 -0500 Subject: [PATCH 3/5] Testing other method --- Makefile | 17 +---------------- root/etc/uci-defaults/luci-easymesh | 11 +++++++++++ 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index bdd2d74..6835d86 100755 --- a/Makefile +++ b/Makefile @@ -6,28 +6,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-easymesh -PKG_VERSION:=2.8.14 +PKG_VERSION:=2.8.15 PKG_RELEASE:=$(AUTORELEASE) PKG_MAINTAINER:=Jason Hawks LUCI_TITLE:=LuCI Support for easymesh LUCI_DEPENDS:= +kmod-cfg80211 +batctl-default +kmod-batman-adv +dawn +bash -define Package/luci-app-easymesh/postinst -#!/bin/sh - -if [ ! -f /etc/config/easymesh ]; then - echo "Creating /etc/config/easymesh" - cat < /etc/config/easymesh -config easymesh 'config' - option enabled '0' -EOF - reload_config -else - echo "/etc/config/easymesh exists, skipping creation" -fi -endef - include $(TOPDIR)/feeds/luci/luci.mk # call BuildPackage - OpenWrt buildroot signature diff --git a/root/etc/uci-defaults/luci-easymesh b/root/etc/uci-defaults/luci-easymesh index 92b0774..d2185d9 100755 --- a/root/etc/uci-defaults/luci-easymesh +++ b/root/etc/uci-defaults/luci-easymesh @@ -1,5 +1,16 @@ #!/bin/sh +if [ ! -f /etc/config/easymesh ]; then + echo "Creating /etc/config/easymesh" + cat < /etc/config/easymesh +config easymesh 'config' + option enabled '0' +EOF + reload_config +else + echo "/etc/config/easymesh exists, skipping creation" +fi + uci -q batch <<-EOF >/dev/null delete ucitrack.@easymesh[-1] add ucitrack easymesh From de13f9ea7affc660eb7dab73e7e88598d400936f Mon Sep 17 00:00:00 2001 From: Jason Hawks Date: Fri, 17 Nov 2023 02:25:59 -0500 Subject: [PATCH 4/5] Final config preserve test --- Makefile | 2 +- root/etc/uci-defaults/luci-easymesh | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 6835d86..663cdb4 100755 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-easymesh -PKG_VERSION:=2.8.15 +PKG_VERSION:=2.8.16 PKG_RELEASE:=$(AUTORELEASE) PKG_MAINTAINER:=Jason Hawks diff --git a/root/etc/uci-defaults/luci-easymesh b/root/etc/uci-defaults/luci-easymesh index d2185d9..e301557 100755 --- a/root/etc/uci-defaults/luci-easymesh +++ b/root/etc/uci-defaults/luci-easymesh @@ -11,12 +11,12 @@ else echo "/etc/config/easymesh exists, skipping creation" fi -uci -q batch <<-EOF >/dev/null - delete ucitrack.@easymesh[-1] - add ucitrack easymesh - set ucitrack.@easymesh[-1].init=easymesh - commit ucitrack -EOF +# uci -q batch <<-EOF >/dev/null +# delete ucitrack.@easymesh[-1] +# add ucitrack easymesh +# set ucitrack.@easymesh[-1].init=easymesh +# commit ucitrack +# EOF rm -f /tmp/luci-indexcache exit 0 From 0f1170a35d76e051d06e663d3494c9bcb976722b Mon Sep 17 00:00:00 2001 From: Jason Hawks Date: Fri, 17 Nov 2023 02:34:39 -0500 Subject: [PATCH 5/5] This seems best, going this for final --- Makefile | 2 +- root/etc/uci-defaults/luci-easymesh | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 663cdb4..28a9829 100755 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-easymesh -PKG_VERSION:=2.8.16 +PKG_VERSION:=2.8.17 PKG_RELEASE:=$(AUTORELEASE) PKG_MAINTAINER:=Jason Hawks diff --git a/root/etc/uci-defaults/luci-easymesh b/root/etc/uci-defaults/luci-easymesh index e301557..d2185d9 100755 --- a/root/etc/uci-defaults/luci-easymesh +++ b/root/etc/uci-defaults/luci-easymesh @@ -11,12 +11,12 @@ else echo "/etc/config/easymesh exists, skipping creation" fi -# uci -q batch <<-EOF >/dev/null -# delete ucitrack.@easymesh[-1] -# add ucitrack easymesh -# set ucitrack.@easymesh[-1].init=easymesh -# commit ucitrack -# EOF +uci -q batch <<-EOF >/dev/null + delete ucitrack.@easymesh[-1] + add ucitrack easymesh + set ucitrack.@easymesh[-1].init=easymesh + commit ucitrack +EOF rm -f /tmp/luci-indexcache exit 0