| 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..0ec4d11c1716295c730aa360e416d2fc36e34080 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'
|
| + 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}" = "20" ]; then
|
| + 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
|
|
|