On Wed, 13 Jul 2011, David Coppa wrote: > OK? > Is the script correct?
It looks fine yes. But you need to make sure you tested _all_ rc_cmd. > > ciao, > david > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/net/aiccu/Makefile,v > retrieving revision 1.3 > diff -u -p -r1.3 Makefile > --- Makefile 18 Oct 2010 18:36:45 -0000 1.3 > +++ Makefile 13 Jul 2011 08:03:52 -0000 > @@ -5,6 +5,7 @@ COMMENT= SixXS automatic IPv6 connectivi > VERSION= 20070115 > DISTNAME= aiccu_${VERSION} > PKGNAME= aiccu-${VERSION} > +REVISION= 0 > CATEGORIES= net > HOMEPAGE= http://www.sixxs.net/tools/aiccu/ > > Index: pkg/MESSAGE > =================================================================== > RCS file: /cvs/ports/net/aiccu/pkg/MESSAGE,v > retrieving revision 1.1.1.1 > diff -u -p -r1.1.1.1 MESSAGE > --- pkg/MESSAGE 13 Feb 2007 20:30:48 -0000 1.1.1.1 > +++ pkg/MESSAGE 13 Jul 2011 08:03:52 -0000 > @@ -1,12 +1,2 @@ > Go to www.sixxs.net and get a free account. > Edit ${SYSCONFDIR}/aiccu.conf and insert your account data. > - > -You can start the daemon like this: > -${PREFIX}/sbin/aiccu start > - > -Add the following to the /etc/rc.local script to start the daemon on boot: > - > -if [ -x ${PREFIX}/sbin/aiccu -a -f ${SYSCONFDIR}/aiccu.conf ]; then > - echo -n ' aiccu' > - ${PREFIX}/sbin/aiccu start > -fi > Index: pkg/PLIST > =================================================================== > RCS file: /cvs/ports/net/aiccu/pkg/PLIST,v > retrieving revision 1.1.1.1 > diff -u -p -r1.1.1.1 PLIST > --- pkg/PLIST 13 Feb 2007 20:30:48 -0000 1.1.1.1 > +++ pkg/PLIST 13 Jul 2011 08:03:52 -0000 > @@ -5,3 +5,5 @@ share/examples/aiccu/ > share/examples/aiccu/aiccu.conf > @mode 600 > @sample ${SYSCONFDIR}/aiccu.conf > +@mode > +@rcscript ${RCDIR}/aiccu > Index: pkg/aiccu.rc > =================================================================== > RCS file: pkg/aiccu.rc > diff -N pkg/aiccu.rc > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ pkg/aiccu.rc 13 Jul 2011 08:03:52 -0000 > @@ -0,0 +1,19 @@ > +#!/bin/sh > +# > +# $OpenBSD$ > + > +daemon="${TRUEPREFIX}/sbin/aiccu" > + > +. /etc/rc.d/rc.subr > + > +rc_reload=NO > + > +rc_start() { > + ${rcexec} "${daemon} start" > +} > + > +rc_stop() { > + ${daemon} stop > +} > + > +rc_cmd $1 > -- Antoine