aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/ugps
diff options
context:
space:
mode:
Diffstat (limited to 'package/utils/ugps')
-rw-r--r--package/utils/ugps/files/ugps.init13
1 files changed, 9 insertions, 4 deletions
diff --git a/package/utils/ugps/files/ugps.init b/package/utils/ugps/files/ugps.init
index 3cd1ca1b8d..77c3603066 100644
--- a/package/utils/ugps/files/ugps.init
+++ b/package/utils/ugps/files/ugps.init
@@ -16,11 +16,16 @@ start_service() {
local disabled="$(uci get gps.@gps[-1].disabled || echo 0)"
[ "$disabled" == "0" ] || return
+ [ "$tty" ] || 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"