]> Frank Brehm's Git Trees - config/bruni/etc.git/commitdiff
committing changes in /etc after emerge run
authorFrank Brehm <frank@brehm-online.com>
Wed, 18 May 2016 20:45:17 +0000 (22:45 +0200)
committerFrank Brehm <frank@brehm-online.com>
Wed, 18 May 2016 20:45:17 +0000 (22:45 +0200)
Package changes:
+sci-geosciences/gpsd-3.9-r1

conf.d/gpsd [new file with mode: 0644]
init.d/gpsd [new file with mode: 0755]

diff --git a/conf.d/gpsd b/conf.d/gpsd
new file mode 100644 (file)
index 0000000..b077fdb
--- /dev/null
@@ -0,0 +1,8 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Config file for gpsd server
+GPSD_OPTIONS=""
+DEVICES=""
+GPSD_SOCKET="/var/run/gpsd.sock"
diff --git a/init.d/gpsd b/init.d/gpsd
new file mode 100755 (executable)
index 0000000..ad734e3
--- /dev/null
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+       after dbus
+       before ntpd
+}
+
+PIDFILE=/var/run/${SVCNAME}.pid
+DAEMON=/usr/sbin/gpsd
+
+checkconfig() {
+       # Note: these GPSD_xxx var names should be kept in sync with the udev rules.
+       if [ -z "${GPSD_SOCKET}" ] && [ -z "${DEVICES}" ]; then
+               GPSD_SOCKET="/var/run/gpsd.sock"
+       fi
+
+       if [ -n "${GPSD_SOCKET}" ]; then
+               GPSD_OPTIONS="${GPSD_OPTIONS} -F ${GPSD_SOCKET}"
+       fi
+}
+
+start() {
+       checkconfig
+       ebegin "Starting gpsd"
+
+       start-stop-daemon --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- \
+               ${GPSD_OPTIONS} -P ${PIDFILE} ${DEVICES}
+       eend $?
+}
+
+stop() {
+       ebegin "Stopping gpsd"
+       start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile ${PIDFILE}
+       eend $?
+       rm -f ${PIDFILE}
+}