summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <nerdboy@gentoo.org>2007-01-14 23:01:11 +0000
committerSteve Arnold <nerdboy@gentoo.org>2007-01-14 23:01:11 +0000
commitbc224a9d0f07c13a43763dda1a59c2629db684aa (patch)
tree615c556a795bc2cded240c022517a0604239f60d /sci-geosciences
parentEbuild maintenance (diff)
downloadgentoo-2-bc224a9d0f07c13a43763dda1a59c2629db684aa.tar.gz
gentoo-2-bc224a9d0f07c13a43763dda1a59c2629db684aa.tar.bz2
gentoo-2-bc224a9d0f07c13a43763dda1a59c2629db684aa.zip
reverted to strict config setup
(Portage version: 2.1.2_rc4-r2)
Diffstat (limited to 'sci-geosciences')
-rw-r--r--sci-geosciences/gpsd/ChangeLog8
-rw-r--r--sci-geosciences/gpsd/files/gpsd.conf24
-rwxr-xr-xsci-geosciences/gpsd/files/gpsd.init12
3 files changed, 34 insertions, 10 deletions
diff --git a/sci-geosciences/gpsd/ChangeLog b/sci-geosciences/gpsd/ChangeLog
index d604ba35141e..542b6465c3d7 100644
--- a/sci-geosciences/gpsd/ChangeLog
+++ b/sci-geosciences/gpsd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-geosciences/gpsd
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/ChangeLog,v 1.24 2007/01/14 22:15:46 nerdboy Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/ChangeLog,v 1.25 2007/01/14 23:01:11 nerdboy Exp $
+
+ 14 Jan 2007; Steve Arnold <nerdboy@gentoo.org> files/gpsd.conf,
+ files/gpsd.init:
+ reverted to strict config setup, since gpsd requires the device parameter
+ when using the init script to start gpsd with an existing device (even a
+ usb device).
*gpsd-2.34 (14 Jan 2007)
diff --git a/sci-geosciences/gpsd/files/gpsd.conf b/sci-geosciences/gpsd/files/gpsd.conf
index d2aa337a8e82..b96b63aa10d8 100644
--- a/sci-geosciences/gpsd/files/gpsd.conf
+++ b/sci-geosciences/gpsd/files/gpsd.conf
@@ -1,15 +1,25 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/files/gpsd.conf,v 1.4 2007/01/14 22:15:46 nerdboy Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/files/gpsd.conf,v 1.5 2007/01/14 23:01:11 nerdboy Exp $
# Config file for gpsd server
# ATTENTION: most of the configuration is done in the kernel device
-# setup for USB/Serial, Garmin, or other. gpsd should not need any
-# specific arguments, however, see the INSTALL file for trouble-
-# shooting steps and other hints.
+# setup for USB/Serial, Garmin, or other, however, without hotplug,
+# gpsd still needs to have the device set on the commandline.
-# try something like this for older gpsd
-#GPSD_OPTS="-P /var/run/gpsd.pid -f GPS0 -F /var/run/gpsd.sock"
+# Set GPS_DEV to the device to be used by the gpsd server.
+# This device must have the group tty and be writable (see
+# the INSTALL file in the docs).
+
+# This example is for a Deluo GPS Serial/USB converter dongle, really
+# a pl2303 chip - CONFIG_USB_SERIAL_PL2303 in modern 2.6 kernels.
+# The normal udev config provides the correct /dev/ttyUSB0 device.
+# The second example is just a normal serial port...
+
+#GPS_DEV="/dev/ttyUSB0"
+
+#GPS_DEV="/dev/ttyS0
+
+GPSD_OPTS="-P /var/run/gpsd.pid -f GPS0 -F /var/run/gpsd.sock"
-GPSD_OPTS=""
diff --git a/sci-geosciences/gpsd/files/gpsd.init b/sci-geosciences/gpsd/files/gpsd.init
index e2fb3b86a88a..05bdf97c58b6 100755
--- a/sci-geosciences/gpsd/files/gpsd.init
+++ b/sci-geosciences/gpsd/files/gpsd.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/files/gpsd.init,v 1.4 2007/01/14 22:15:46 nerdboy Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/files/gpsd.init,v 1.5 2007/01/14 23:01:11 nerdboy Exp $
# You can use this init script to manage a serial port GPS or other
# non-hotplug device (or any device for that matter). By design,
@@ -12,10 +12,18 @@ depend() {
before ntpd
}
+checkconfig() {
+ if [ -z "${GPS_DEV}" ]; then
+ eerror "You must define GPS_DEV in /etc/conf.d/gpsd."
+ return 1
+ fi
+}
+
start() {
+ checkconfig || return 1
ebegin "Starting gpsd"
touch /var/run/gpsd.pid
- /usr/sbin/gpsd ${GPSD_OPTS}
+ /usr/sbin/gpsd ${GPSD_OPTS} ${GPS_DEV}
eend $? "Failed to start gpsd"
}