On Wed, Nov 03, 2010 at 06:35:22PM +0100, Matthias Kilian wrote:
> - polipo exits on SIGHUP, so let rc_reload() just call rc_cmd restart
[...]
> +rc_reload() {
> +     rc_cmd restart
> +}

ajacoutot@ pointed out that this is wrong. rc_reload() should just error
out in this case.


Index: Makefile
===================================================================
RCS file: /cvs/ports/www/polipo/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile    26 Oct 2010 15:29:24 -0000      1.9
+++ Makefile    3 Nov 2010 18:55:46 -0000
@@ -4,7 +4,7 @@ COMMENT=        HTTP caching proxy
 
 DISTNAME=      polipo-1.0.4.1
 CATEGORIES=    www
-REVISION=      0
+REVISION=      1
 
 HOMEPAGE=      http://www.pps.jussieu.fr/~jch/software/polipo/
 
Index: pkg/MESSAGE
===================================================================
RCS file: pkg/MESSAGE
diff -N pkg/MESSAGE
--- pkg/MESSAGE 6 Aug 2005 21:21:53 -0000       1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-When run as the root user, the polipo daemon will drop privileges to
-that of the _polipo user and its login group.
-
-Some sample configuration files have been installed in
-${SYSCONFDIR}/polipo.
-
-Additionally, you may wish to start polipo at system start-up time via
-the /etc/rc.local script.
-
-if [ X"${polipo}" == X"YES" -a -x ${PREFIX}/bin/polipo ]; then
-        echo -n ' polipo'
-        ${PREFIX}/bin/polipo daemonise=yes
-fi
-
-and adding "polipo=YES" to /etc/rc.conf.local
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/polipo/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   3 Feb 2008 15:06:48 -0000       1.3
+++ pkg/PLIST   3 Nov 2010 18:55:46 -0000
@@ -1,7 +1,7 @@
 @comment $OpenBSD: PLIST,v 1.3 2008/02/03 15:06:48 kili Exp $
 @newgroup _polipo:548
 @newuser _polipo:548:_polipo:daemon:Polipo Account:/nonexistent:/sbin/nologin
-bin/polipo
+...@bin bin/polipo
 @info info/polipo.info
 @man man/man1/polipo.1
 share/doc/polipo/
@@ -88,3 +88,7 @@ share/examples/polipo/forbidden.sample
 @sample /var/polipo/
 @sample /var/polipo/cache/
 @extraunexec rm -rf /var/polipo/*
+...@mode
+...@owner
+...@group
+...@rcscript ${RCDIR}/polipo
Index: pkg/polipo.rc
===================================================================
RCS file: pkg/polipo.rc
diff -N pkg/polipo.rc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/polipo.rc       3 Nov 2010 18:55:46 -0000
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+. /etc/rc.d/rc.subr
+
+daemon="/usr/local/bin/polipo"
+daemon_flags="daemonise=yes"
+
+rc_reload() {
+       rc_err "$0: reload is not supported"
+}
+
+rc_cmd $1

Reply via email to