diff -Nrux .svn -x work /usr/ports/astro/gpsd/Makefile gpsd/Makefile --- /usr/ports/astro/gpsd/Makefile Mon Aug 6 13:40:11 2007 +++ gpsd/Makefile Thu Aug 16 17:56:37 2007 @@ -15,6 +15,7 @@ MAINTAINER= toxa@toxahost.ru COMMENT= Daemon that monitors one or more GPSes attached to a host computer +USE_RC_SUBR= gpsd.sh USE_AUTOTOOLS= libtool:15 GNU_CONFIGURE= yes USE_LDCONFIG= yes diff -Nrux .svn -x work /usr/ports/astro/gpsd/files/gpsd.sh.in gpsd/files/gpsd.sh.in --- /usr/ports/astro/gpsd/files/gpsd.sh.in Wed Dec 31 16:00:00 1969 +++ gpsd/files/gpsd.sh.in Thu Aug 16 17:53:26 2007 @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: gpsd +# REQUIRE: NETWORKING DAEMON cleanvar devfs +# BEFORE: ntpd +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable gpsd: +# +# gpsd_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable gpsd. +# +# gpsd_flags (str): Set to "" by default. +# See gpsd(8) for flags. +# +# gpsd_devices (str): Set to "" by default. +# Example: "/dev/cuaU0" for a USB serial GPS. +# + +. %%RC_SUBR%% + +name=gpsd +rcvar=`set_rcvar` + +load_rc_config $name + +# Set defaults +: ${gpsd_enable:="NO"} +: ${gpsd_flags:=""} +: ${gpsd_devices:=""} + +pidfile=/var/run/$name.pid +command=%%PREFIX%%/sbin/$name +command_args="-P $pidfile $gpsd_devices" + +run_rc_command "$1"