mirror of
https://github.com/openwrt/openwrt.git
synced 2025-04-09 04:15:47 +00:00
ugps: Add option disabled
Like many other packages, an option to disable can be practical. Signed-off-by: Bruno Randolf <br1@einfach.org> (cherry picked from commit 6b14a73f4f619b7bbdeac1cbcd0d34b0957ca0cb)
This commit is contained in:
parent
def9d215ac
commit
011e7cb5fe
@ -1,3 +1,4 @@
|
||||
config gps
|
||||
option 'tty' 'ttyACM0'
|
||||
option 'adjust_time' '1'
|
||||
option 'disabled' '1'
|
||||
|
@ -13,6 +13,9 @@ service_triggers() {
|
||||
start_service() {
|
||||
local tty="$(uci get gps.@gps[-1].tty)"
|
||||
local atime="$(uci get gps.@gps[-1].adjust_time)"
|
||||
local disabled="$(uci get gps.@gps[-1].disabled || echo 0)"
|
||||
|
||||
[ "$disabled" == "0" ] || return
|
||||
|
||||
[ -c "$tty" ] || {
|
||||
tty="/dev/$tty"
|
||||
|
Loading…
x
Reference in New Issue
Block a user