Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1763)

Unified Diff: sci-geosciences/gpsd/files/gpsd.conf

Issue 6025011: Simplify gpsd ebuild and use the latest available version. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/chromiumos-overlay.git@master
Patch Set: Simplify gpsd ebuild and use the latest available version. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sci-geosciences/gpsd/files/gpsd.conf
diff --git a/sci-geosciences/gpsd/files/gpsd.conf b/sci-geosciences/gpsd/files/gpsd.conf
index baf9bb1695d0177d61ae71ac32b99d82cb321e92..87e5c966d48fb991319c2a3b384ad0e682936adb 100644
--- a/sci-geosciences/gpsd/files/gpsd.conf
+++ b/sci-geosciences/gpsd/files/gpsd.conf
@@ -1,26 +1,30 @@
-# 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.7 2009/08/23 00:01:40 nerdboy Exp $
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
-# Config file for gpsd server
+description "Run gpsd when the system starts"
+author "chromium-os-dev@chromium.org"
-# ATTENTION: most of the configuration is done in the kernel device
-# setup for USB/Serial, Garmin, or other, however, without hotplug,
-# gpsd still needs to have the device set on the commandline.
+start on stopped boot-complete
-# A device may be a local serial device for GPS input, or a URL of
-# the form:
-# [{dgpsip|ntrip}://][user:passwd@]host[:port][/stream]
-# in which case it specifies an input source for DGPS or ntrip data.
-# Set GPS_DEV to the device to be used by the gpsd server (see the
-# INSTALL file in the docs for more info). Run gpsd -h to see a list
-# supported driver types (most are enabled by default).
+script
+ GPSD_LOG='/tmp/gpsd.log'
rochberg 2011/01/07 18:45:24 If you put this in /var/log, then the log-capture
vb 2011/01/07 21:39:11 The only thing which goes into this file are error
rochberg 2011/01/12 00:44:53 Ahhh--I understand. Please consider using logger
+ GPS_DEVICE='/dev/ttyUSB2'
+ GPSD_PARAMS='-D 7'
-# 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.
-
-GPS_DEV="/dev/ttyUSB0"
-
-GPSD_OPTS="-b -n -P /var/run/gpsd.pid -F /var/run/gpsd.sock"
+ exec > "${GPSD_LOG}" 2>&1
+ retry=0
+ while [ ! -e "${GPS_DEVICE}" ]
+ do
+ if [ "${retry}" = "15" ]; then
rochberg 2011/01/07 18:45:24 20 seconds?
vb 2011/01/07 21:39:11 Done.
+ echo "${GPS_DEVICE} not found"
+ exit 1
+ fi
+ sleep 1
+ retry=$((retry + 1))
+ done
+ echo "Found ${GPS_DEVICE} after ${retry} seconds"
+ echo '$GPS_START' > "${GPS_DEVICE}"
+ /usr/sbin/gpsd "${GPSD_PARAMS}" "${GPS_DEVICE}"
+end script

Powered by Google App Engine
This is Rietveld 408576698