Like many other packages, an option to disable can be practical.
Signed-off-by: Bruno Randolf <br1@einfach.org>
config gps
option 'tty' 'ttyACM0'
option 'adjust_time' '1'
config gps
option 'tty' 'ttyACM0'
option 'adjust_time' '1'
start_service() {
local tty="$(uci get gps.@gps[-1].tty)"
local atime="$(uci get gps.@gps[-1].adjust_time)"
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"
[ -c "$tty" ] || {
tty="/dev/$tty"