diff options
author | Julian_chu <julian_chu@openmoko.com> | 2008-09-25 18:07:06 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2008-11-16 16:37:27 +0100 |
commit | 1e1dc41f8dd677f94b063ad7397e8ce1d0608f26 (patch) | |
tree | 51b93b531a01fc999c3a4a8f5dc087343ca6b621 | |
parent | 52abe8d77cbfed9c91a9cae7ed0a7e60aaf50b34 (diff) |
gpsd: Modify gpsd daemon script to use start-stop-daemon
-rwxr-xr-x | packages/gpsd/files/gpsd | 21 | ||||
-rw-r--r-- | packages/gpsd/gpsd_2.34.bb | 2 |
2 files changed, 6 insertions, 17 deletions
diff --git a/packages/gpsd/files/gpsd b/packages/gpsd/files/gpsd index e536837e1c..91f09c1b75 100755 --- a/packages/gpsd/files/gpsd +++ b/packages/gpsd/files/gpsd @@ -10,6 +10,7 @@ #. /etc/rc.d/init.d/functions RETVAL=0 +DAEMON=/usr/sbin/gpsd prog="gpsd" test -f /etc/default/$prog && . /etc/default/$prog @@ -40,29 +41,24 @@ start() { if [ -e "${GPS_DEV}" ] then - gpsd ${GPSD_OPTS} ${GPS_DEV} - echo "success" + start-stop-daemon -S -x ${DAEMON} -- ${GPSD_OPTS} ${GPS_DEV} + echo "success" else # User needs to symlink ${GPS_DEV} to the right thing echo "No ${GPS_DEV} GPS device, aborting gpsd startup. Check /etc/default/$prog" fi RETVAL=$? echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gpsd return $RETVAL } stop() { # Stop daemons. echo -n "Shutting down $prog: " - killall gpsd + start-stop-daemon -K -x ${DAEMON} # killproc gpsd RETVAL=$? echo - if [ $RETVAL -eq 0 ] - then - rm -f /var/lock/subsys/gpsd; - fi return $RETVAL } @@ -79,19 +75,12 @@ case "$1" in start RETVAL=$? ;; - condrestart) - if [ -f /var/lock/subsys/gpsd ]; then - stop - start - RETVAL=$? - fi - ;; status) # status gpsd # RETVAL=$? ;; *) - echo "Usage: $0 {start|stop|restart|condrestart|status}" + echo "Usage: $0 {start|stop|restart|status}" exit 1 esac diff --git a/packages/gpsd/gpsd_2.34.bb b/packages/gpsd/gpsd_2.34.bb index 8e46cb01eb..16b528fd80 100644 --- a/packages/gpsd/gpsd_2.34.bb +++ b/packages/gpsd/gpsd_2.34.bb @@ -1,4 +1,4 @@ require gpsd.inc -PR = "r9" +PR = "r9.01" |