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 Wed Aug 15 20:37:02 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 Wed Aug 1 13:15:59 2007 @@ -0,0 +1,39 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: gpsd +# REQUIRE: +# 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"