Facility for acking/unacking log entries
[gregoa/zavai.git] / hooks / gps
index 410248735b80600ff22c2405060ede89fc7e2167..3d99390e5fffcf5ffa8275c21f3bbb7071f375f4 100755 (executable)
--- 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
@@ -19,16 +14,13 @@ case "$1" in
                old=`om gps --swap power 1`
                if [ $old = 0 ]
                then
-                       om gpt keep_on_during_suspend 1
-                       /etc/init.d/gpsd stop
-                       # TODO: configure to UBX mode
-                       /etc/init.d/gpsd start
+                       om gps keep-on-in-suspend 1
                fi
        ;;
        # When stopping the gps
        stop)
-               /etc/init.d/gpsd stop
                om gps power 0
+               om gps keep-on-in-suspend 0
        ;;
        *)
                echo "Usage: $0 {start|stop|status}." >&2