Hi Daniel,
On 27.05.2021 12:37, Daniel Golle wrote:
Don't bail out from init script in case the GPS device is missing.
Some modems take time to come up, and some people may use things like
'kplex' to feed ugpsd. Hence it is better to always start ugpsd
unconditionally and let procd's respawn take care of retrying.
Wouldn't hotplug be a better solution than respawning process forever
(not sure about kplex usage)?
--
Cheers,
Piotr
Signed-off-by: Daniel Golle <dan...@makrotopia.org>
---
package/utils/ugps/Makefile | 2 +-
package/utils/ugps/files/ugps.init | 12 ++++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/package/utils/ugps/Makefile b/package/utils/ugps/Makefile
index 4ce64d9631..16cdbc41b9 100644
--- a/package/utils/ugps/Makefile
+++ b/package/utils/ugps/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ugps
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ugps.git
PKG_SOURCE_PROTO:=git
diff --git a/package/utils/ugps/files/ugps.init
b/package/utils/ugps/files/ugps.init
index 3cd1ca1b8d..f52b19cc27 100644
--- a/package/utils/ugps/files/ugps.init
+++ b/package/utils/ugps/files/ugps.init
@@ -17,10 +17,14 @@ start_service() {
[ "$disabled" == "0" ] || return
- [ -c "$tty" ] || {
- tty="/dev/$tty"
- [ -c "$tty" ] || return
- }
+ case "$tty" in
+ "/"*)
+ true
+ ;;
+ *)
+ tty="/dev/$tty"
+ ;;
+ esac
procd_open_instance
procd_set_param command "$PROG"
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel