aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/ugps/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/utils/ugps/files')
-rw-r--r--package/utils/ugps/files/gps.config1
-rw-r--r--package/utils/ugps/files/ugps.init2
2 files changed, 3 insertions, 0 deletions
diff --git a/package/utils/ugps/files/gps.config b/package/utils/ugps/files/gps.config
index d997a590ce..eb00d79c60 100644
--- a/package/utils/ugps/files/gps.config
+++ b/package/utils/ugps/files/gps.config
@@ -1,2 +1,3 @@
config gps
option 'tty' 'ttyACM0'
+ option 'adjust_time ' '1'
diff --git a/package/utils/ugps/files/ugps.init b/package/utils/ugps/files/ugps.init
index 621d017869..a7a88c2258 100644
--- a/package/utils/ugps/files/ugps.init
+++ b/package/utils/ugps/files/ugps.init
@@ -12,11 +12,13 @@ service_triggers() {
start_service() {
local tty="$(uci get gps.@gps[-1].tty)"
+ local atime="$(uci get gps.@gps[-1].adjust_time)"
[ -d "/sys/class/tty/$tty/" ] || return
procd_open_instance
procd_set_param command "$PROG" "/dev/$tty"
+ [ "$atime" -eq 0 ] || procd_append_param command "-a"
procd_set_param respawn
procd_close_instance
}