Skip to content

Commit

Permalink
Merge branch 'libremesh:master' into babelnodes
Browse files Browse the repository at this point in the history
  • Loading branch information
javierbrk committed Oct 6, 2023
2 parents 0b90d9f + 9f8754b commit 1daa2bc
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

unique_append()
{
grep -qF "$1" "$2" || echo "$1" >> "$2"
}

unique_append \
'*/5 * * * * ((sleep $(($RANDOM % 120)); shared-state-multiwriter sync reference_state_nodes_info &> /dev/null)&)'\
/etc/crontabs/root
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

unique_append()
{
grep -qF "$1" "$2" || echo "$1" >> "$2"
}

unique_append \
'*/5 * * * * ((sleep $(($RANDOM % 120)); shared-state-multiwriter sync reference_state_wifi_links_info &> /dev/null)&)'\
/etc/crontabs/root
2 changes: 2 additions & 0 deletions packages/lime-system/files/usr/lib/lua/lime/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,8 @@ function utils.is_valid_mac(string)
end
end

--! TODO: Better having a C strcmp/memcmp like behavior so the output can be
--! used for sorting beyond determining equality
function utils.deepcompare(t1,t2)
if t1 == t2 then return true end
local ty1 = type(t1)
Expand Down
13 changes: 6 additions & 7 deletions packages/shared-state-network_nodes/Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
#
# Copyright (C) 2020 German Ferrero <germanferrero@altermundi.net>
# Copyright (C) 2020-2023 Asociacion Civil Altermundi <info@altermundi.net>
#
# This is free software, licensed under the GNU General Public License v3.
# This is free software, licensed under the GNU Affero General Public License v3.
#

include ../../libremesh.mk

define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
TITLE:=$(PKG_NAME) provides shared state database of all times network nodes
MAINTAINER:=Germán Ferrero <[email protected]>
CATEGORY:=LibreMesh
TITLE:=$(PKG_NAME) provides data-type for network nodes marked as reliable by user
MAINTAINER:=Asociacion Civil Altermundi <[email protected]>
DEPENDS:=+shared-state +shared-state-nodes_and_links +lime-system +luci-lib-jsonc \
+libubus-lua +random-numgen
PKGARCH:=all
endef

define Package/$(PKG_NAME)/description
This $(PKG_NAME) provides shared state database of all times network nodes.
Provides data-type for network nodes marked as reliable by user via lime-app
endef

$(eval $(call BuildPackage,$(PKG_NAME)))

0 comments on commit 1daa2bc

Please sign in to comment.