SHA256
1
0
forked from pool/gpsd
OBS User unknown 2008-11-28 14:05:46 +00:00 committed by Git OBS Bridge
parent 8f02528060
commit 91eaed65cc
4 changed files with 57 additions and 42 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Nov 24 12:05:49 CET 2008 - jreuter@suse.de
- Disable TrueNorth Technologies device support, it breaks
autodection (bnc#448002)
- Fix udev script again: must not kill running gpsd if disabled,
missing quotes in test, indention, add parameter to set additional
command line options for gpsd.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Nov 19 12:14:42 CET 2008 - jreuter@suse.de Wed Nov 19 12:14:42 CET 2008 - jreuter@suse.de

View File

@ -24,7 +24,7 @@ License: BSD 3-Clause
Url: http://gpsd.berlios.de/ Url: http://gpsd.berlios.de/
Group: Hardware/Other Group: Hardware/Other
Version: 2.37 Version: 2.37
Release: 69 Release: 70
Requires: udev Requires: udev
PreReq: coreutils %fillup_prereq PreReq: coreutils %fillup_prereq
BuildRequires: gcc-c++ ncurses-devel openmotif openmotif-devel python-devel udev update-desktop-files xmlto BuildRequires: gcc-c++ ncurses-devel openmotif openmotif-devel python-devel udev update-desktop-files xmlto
@ -141,8 +141,7 @@ Authors:
%if 0%{?suse_version} > 1020 %if 0%{?suse_version} > 1020
--enable-dbus \ --enable-dbus \
%endif %endif
--enable-garmintxt \ --enable-garmintxt
--enable-tnt
%__make %{?jobs:-j%jobs} %__make %{?jobs:-j%jobs}
%install %install
@ -243,6 +242,12 @@ rm -rf %{buildroot}
%{_datadir}/pixmaps/*.xpm %{_datadir}/pixmaps/*.xpm
%changelog %changelog
* Mon Nov 24 2008 jreuter@suse.de
- Disable TrueNorth Technologies device support, it breaks
autodection (bnc#448002)
- Fix udev script again: must not kill running gpsd if disabled,
missing quotes in test, indention, add parameter to set additional
command line options for gpsd.
* Wed Nov 19 2008 jreuter@suse.de * Wed Nov 19 2008 jreuter@suse.de
- Sleep a second before setting the default device in udev - Sleep a second before setting the default device in udev
script to give gpsd some time to set up the TCP socket script to give gpsd some time to set up the TCP socket

View File

@ -1,18 +1,24 @@
## Path: Hardware/GPS ## Path: Hardware/GPS
## Description: GPS Daemon ## Description: GPS Daemon
## Description: TCP port number for gpsd to listen on
## Type: integer
## Default: 2947
#
# Use another port for the deamon
#
PORT=
## Description: Start gpsd by udev
## Type: yesno ## Type: yesno
## Default: no ## Default: no
# #
# Whether or not to start gpsd automatically on plugin event # Whether or not to start gpsd automatically on plugin event
# #
STARTBYUDEV="no" GPSD_STARTBYUDEV="no"
## Type: integer
## Default: 2947
#
# Use different port for the daemon
#
GPSD_PORT=
## Type: string
## Default: ""
#
# Further options to gpsd
#
GPSD_OPTIONS=""

View File

@ -2,6 +2,11 @@
CTRL_SOCK="/var/run/gpsd.socket" CTRL_SOCK="/var/run/gpsd.socket"
DEV_NAME="/var/run/gpsd.device" DEV_NAME="/var/run/gpsd.device"
. /etc/sysconfig/gpsd
if [ "$GPSD_STARTBYUDEV" != "yes" ]; then
exit 1
fi
if [ "${ACTION}" = "remove" ]; then if [ "${ACTION}" = "remove" ]; then
GPSD_PID=$(pidof gpsd) GPSD_PID=$(pidof gpsd)
@ -13,40 +18,30 @@ if [ "${ACTION}" = "remove" ]; then
TTYDEV="/dev/$(basename $DEVPATH)" TTYDEV="/dev/$(basename $DEVPATH)"
TTYDEV_SAVE=$(cat ${DEV_NAME}) TTYDEV_SAVE=$(cat ${DEV_NAME})
if [ ${TTYDEV} = ${TTYDEV_SAVE} ]; then if [ "${TTYDEV}" = "${TTYDEV_SAVE}" ]; then
# send TERM signal # send TERM signal
kill -15 ${GPSD_PID} kill -15 ${GPSD_PID}
rm -f ${DEV_NAME} rm -f ${DEV_NAME}
fi fi
fi fi
else else
case "$DEVPATH" in
*tty*)
case "$DEVPATH" in TTYDEV="/dev/$(basename $DEVPATH)"
*tty*) options="-F $CTRL_SOCK $GPSD_OPTIONS"
TTYDEV="/dev/$(basename $DEVPATH)"
options="-F $CTRL_SOCK" if [ -n "$GPSD_PORT" ]; then
options="$options -S $GPSD_PORT"
. /etc/sysconfig/gpsd else
GPSD_PORT=2947
if [ "$STARTBYUDEV" != "yes" ]; then fi
exit 1
fi echo "Action '${ACTION}' Launch gpsd to $TTYDEV with $options"
if [ -n "$PORT" ]; then /usr/sbin/gpsd $options ${TTYDEV}
options="$options -S $PORT" echo "${TTYDEV}" > ${DEV_NAME}
else (sleep 1 && echo "F=$TTYDEV" >/dev/tcp/localhost/$GPSD_PORT) &
PORT=2947 ;;
fi esac
echo "Action '${ACTION}' Launch gpsd to $TTYDEV with $options"
/usr/sbin/gpsd $options ${TTYDEV}
echo "${TTYDEV}" > ${DEV_NAME}
sleep 1
echo "F=$TTYDEV" >/dev/tcp/localhost/$PORT
;;
esac
fi 2>&1 | /bin/logger -t gpsd fi 2>&1 | /bin/logger -t gpsd