summaryrefslogtreecommitdiff
path: root/recipes-connectivity
diff options
context:
space:
mode:
authorJason Reiss <jreiss@multitech.com>2017-12-07 13:00:04 -0600
committerJason Reiss <jreiss@multitech.com>2017-12-07 13:00:04 -0600
commit49a90a1ecb9bbd90947d3bef330ffa410ce84618 (patch)
tree4a4be618c812d67f71b3243d3c7829e35a812e7f /recipes-connectivity
parentbeea89e418c5351ca41c2cd00fc88fe8a6510204 (diff)
downloadmeta-mlinux-49a90a1ecb9bbd90947d3bef330ffa410ce84618.tar.gz
meta-mlinux-49a90a1ecb9bbd90947d3bef330ffa410ce84618.tar.bz2
meta-mlinux-49a90a1ecb9bbd90947d3bef330ffa410ce84618.zip
lora: update network server to 2.0.8 and add lock to init script
Diffstat (limited to 'recipes-connectivity')
-rwxr-xr-xrecipes-connectivity/lora/lora-network-server/lora-network-server.init21
-rw-r--r--recipes-connectivity/lora/lora-network-server_2.0.8.bb (renamed from recipes-connectivity/lora/lora-network-server_2.0.7.bb)4
2 files changed, 22 insertions, 3 deletions
diff --git a/recipes-connectivity/lora/lora-network-server/lora-network-server.init b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
index 9dc8f7a..032a0f7 100755
--- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init
+++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
@@ -2,6 +2,7 @@
NAME="lora-network-server"
+LOCK="/var/lock/$NAME"
ENABLED="yes"
@@ -147,17 +148,35 @@ if [ "$ENABLED" != "yes" ]; then
exit
fi
+force_stop() {
+ do_stop
+ rm -fr $LOCK
+}
+
+function try_lock() {
+ if mkdir $LOCK; then
+ trap "rm -fr $LOCK" EXIT
+ else
+ echo "Lora Network Server lock not acquired, resource in use"
+ exit 1
+ fi
+}
+
+
+
case "$1" in
"start")
+ try_lock
do_start
;;
"stop")
- do_stop
+ force_stop
;;
"restart")
## Stop the service and regardless of whether it was
## running or not, start it again.
+ try_lock
do_stop
do_start
;;
diff --git a/recipes-connectivity/lora/lora-network-server_2.0.7.bb b/recipes-connectivity/lora/lora-network-server_2.0.8.bb
index 68c4df1..e4be412 100644
--- a/recipes-connectivity/lora/lora-network-server_2.0.7.bb
+++ b/recipes-connectivity/lora/lora-network-server_2.0.8.bb
@@ -14,8 +14,8 @@ SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${
file://lora-network-server.logrotate.conf \
"
-SRC_URI[md5sum] = "fb2bc7c58ab82fe7264071cd79c4e223"
-SRC_URI[sha256sum] = "89634ca5501af9cd7b4fcb89837a446f3baf70b835229c96a1a13c2a90f0eb5e"
+SRC_URI[md5sum] = "3ea65afefc38fd9633caf850bebcc260"
+SRC_URI[sha256sum] = "3587d83b3d31126024af9fcede79b1b3efdeb333d6e39ad12e8b4ea02fc11196"
# binaries are already stripped, so suppress warning
INSANE_SKIP_${PN} = "already-stripped"