1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-17 12:43:56 +02:00

ugps: start also in case device is absent

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.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 3d026d2425)
This commit is contained in:
Daniel Golle 2021-05-27 12:34:38 +02:00
parent 25c75424e7
commit 072d0afb8f

View File

@ -16,11 +16,16 @@ start_service() {
local disabled="$(uci get gps.@gps[-1].disabled || echo 0)" local disabled="$(uci get gps.@gps[-1].disabled || echo 0)"
[ "$disabled" == "0" ] || return [ "$disabled" == "0" ] || return
[ "$tty" ] || return
[ -c "$tty" ] || { case "$tty" in
tty="/dev/$tty" "/"*)
[ -c "$tty" ] || return true
} ;;
*)
tty="/dev/$tty"
;;
esac
procd_open_instance procd_open_instance
procd_set_param command "$PROG" procd_set_param command "$PROG"