From c08718c50f0fe5edf8dd5d2338cf1938508cb139 Mon Sep 17 00:00:00 2001 From: Enrico Zini Date: Thu, 11 Mar 2010 23:15:56 +0100 Subject: [PATCH] Leave gpsd always on and just control gps power --- hooks/gps | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/hooks/gps b/hooks/gps index c11c8b9..3d99390 100755 --- a/hooks/gps +++ b/hooks/gps @@ -4,12 +4,7 @@ case "$1" in status) if [ `om gps power` = 1 ] then - if [ `pgrep -c gpsd` != 0 ] - then - echo on - else - echo off - fi + echo on else echo off fi @@ -20,16 +15,12 @@ case "$1" in if [ $old = 0 ] then om gps keep-on-in-suspend 1 - /etc/init.d/gpsd stop - # TODO: configure to UBX mode - /etc/init.d/gpsd start fi ;; # When stopping the gps stop) - /etc/init.d/gpsd stop om gps power 0 - om gps keep-on-in-suspend o + om gps keep-on-in-suspend 0 ;; *) echo "Usage: $0 {start|stop|status}." >&2 -- 2.39.5