Fix another instance of replacing %%DAEMON%% with /usr/sbin/daemon,

somehow missed by dougb - still, thanks for doing it :)  However,
drop the -f option to daemon - with both readproctitle and
multilog, we definitely do *not* want to lose svscan's output.

While I'm here, restore the spirit of the STARTUP_SCRIPT functionality
removed in pgollucci's rc.subr change by introducing the S_NORMAL and
S_EARLY option knobs and modifying the startup script's REQUIRE and
BEFORE settings accordingly.

Add short descriptive headers to the patches and bump PORTREVISION
for the real changes.

Reported by:	Valentin Zahariev <curly@e-card.bg> (the daemon part)
This commit is contained in:
roam
2010-01-06 11:07:54 +00:00
parent 5d89d3fa42
commit 67c71975bb
4 changed files with 39 additions and 8 deletions
+21 -1
View File
@@ -7,7 +7,7 @@
PORTNAME= daemontools
PORTVERSION= 0.76
PORTREVISION= 13
PORTREVISION= 14
CATEGORIES= sysutils
MASTER_SITES= http://cr.yp.to/daemontools/ \
ftp://cr.yp.to/daemontools/
@@ -17,11 +17,31 @@ MAINTAINER= roam@FreeBSD.org
COMMENT= Service monitoring and logging utilities by djb
OPTIONS= MAN "Install Gerrit Pape's manual pages" on \
S_EARLY "Start early, before the normal daemons" off \
S_NORMAL "Start normally in the usual boot sequence" on \
SIGQ12 "Add svc support for QUIT, USR1, and USR2 signals" off \
TESTS "Run the test suite, fails on NFS-mounted workdir" on
.include <bsd.port.pre.mk>
.if defined(WITH_S_EARLY)
. if defined(WITH_S_NORMAL)
IGNORE= Exactly one of S_EARLY and S_NORMAL must be specified.
. else
SVSCAN_REQUIRE?= SERVERS
SVSCAN_BEFORE?= DAEMON
. endif
.else
. if defined(WITH_S_NORMAL)
SVSCAN_REQUIRE?= LOGIN
SVSCAN_BEFORE?=
. else
IGNORE= Either S_EARLY or S_NORMAL must be specified.
. endif
.endif
SUB_LIST+= SVSCAN_REQUIRE=${SVSCAN_REQUIRE} SVSCAN_BEFORE=${SVSCAN_BEFORE}
.if !defined(WITHOUT_MAN)
MANDATE= -20010714
MASTER_SITES+= http://smarden.org/pape/djb/manpages/:1
+7 -2
View File
@@ -1,5 +1,10 @@
--- Makefile.old Fri Aug 31 15:16:47 2001
+++ Makefile Fri Aug 31 15:17:04 2001
Description: Do not use the "home" file, FreeBSD has a different mechanism.
Forwarded: not-needed
Author: Peter Pentchev <roam@FreeBSD.org>
Last-Update: 2010-01-06
--- Makefile.orig
+++ Makefile
@@ -82,10 +82,9 @@
chkshsgr.o: chkshsgr.c compile
./compile chkshsgr.c
+7 -2
View File
@@ -1,5 +1,10 @@
--- Makefile.old 2007-10-30 12:18:08.000000000 +0200
+++ Makefile 2007-10-30 12:18:16.000000000 +0200
Description: Skip the run-time test suite if requested by the port options.
Forwarded: not-needed
Author: Peter Pentchev <roam@FreeBSD.org>
Last-Update: 2010-01-05
--- Makefile.orig
+++ Makefile
@@ -264,7 +264,7 @@
rts: envdir envuidgid fghack matchtest multilog pgrphack \
readproctitle rts.tests setlock setuidgid softlimit supervise svc \
+4 -3
View File
@@ -4,7 +4,8 @@
#
# PROVIDE: svscan
# REQUIRE: LOGIN
# REQUIRE: %%SVSCAN_REQUIRE%%
# BEFORE: %%SVSCAN_BEFORE%%
# Define these svscan_* variables in one of these files:
# /etc/rc.conf
@@ -84,11 +85,11 @@ svscan_start () {
EP="/usr/bin/env \
PATH=%%PREFIX%%/sbin:%%PREFIX%%/bin:/usr/sbin:/usr/bin:/sbin:/bin"
if [ -z "${svscan_logdir}" ]; then
${EP} /usr/sbin/daemon -f /bin/sh -c "$command $svscan_servicedir 2>&1 | %%PREFIX%%/bin/readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................ &" > /dev/null
${EP} /usr/sbin/daemon /bin/sh -c "$command $svscan_servicedir 2>&1 | %%PREFIX%%/bin/readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................ &" > /dev/null
else
logmax=${svscan_logmax+s$svscan_logmax}
lognum=${svscan_lognum+n$svscan_lognum}
${EP} %%DAEMON%% /bin/sh -c "$command $svscan_servicedir 2>&1 \
${EP} /usr/sbin/daemon /bin/sh -c "$command $svscan_servicedir 2>&1 \
| %%PREFIX%%/bin/multilog t $logmax $lognum '${svscan_logdir}' &" > /dev/null
fi
}