Index: head/sysutils/daemontools/Makefile =================================================================== --- head/sysutils/daemontools/Makefile (revision 414545) +++ head/sysutils/daemontools/Makefile (revision 414546) @@ -1,89 +1,89 @@ # Created by: Dom Mitchell # $FreeBSD$ PORTNAME= daemontools PORTVERSION= 0.76 -PORTREVISION= 17 +PORTREVISION= 18 CATEGORIES= sysutils MASTER_SITES= http://cr.yp.to/daemontools/ \ http://mirror.shatow.net/freebsd/${PORTNAME}/:DEFAULT,1 \ LOCAL/bdrewery/${PORTNAME}/:DEFAULT,1 DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= bdrewery@FreeBSD.org COMMENT= Service monitoring and logging utilities by djb LICENSE= PD CONFLICTS= freedt-[0-9]* serialmail-[0-9]* OPTIONS_DEFINE= MAN SIGQ12 TESTS OPTIONS_SUB= yes MAN_DESC= Install Gerrit Pape's manual pages S_EARLY_DESC= Start early, before the normal daemons S_NORMAL_DESC= Start normally in the usual boot sequence SIGQ12_DESC= Add svc support for QUIT, USR1, and USR2 signals TESTS_DESC= Run the test suite, fails on NFS-mounted workdir OPTIONS_SINGLE= SEQ OPTIONS_SINGLE_SEQ= S_EARLY S_NORMAL OPTIONS_DEFAULT= MAN S_NORMAL TESTS .include . if ${PORT_OPTIONS:MS_EARLY} SVSCAN_REQUIRE?= SERVERS SVSCAN_BEFORE?= DAEMON . endif . if ${PORT_OPTIONS:MS_NORMAL} SVSCAN_REQUIRE?= LOGIN SVSCAN_BEFORE?= . endif SUB_LIST+= SVSCAN_REQUIRE=${SVSCAN_REQUIRE} SVSCAN_BEFORE=${SVSCAN_BEFORE} .if ${PORT_OPTIONS:MMAN} MANDATE= -20010714 MASTER_SITES+= http://smarden.org/pape/djb/manpages/:1 DISTFILES+= ${DISTNAME}-man${MANDATE}.tar.gz:1 .endif .if ${PORT_OPTIONS:MSIGQ12} #PATCH_SITES+= http://thedjbway.org/patches/:sigq12 PATCH_SITES+= LOCAL/bdrewery/${PORTNAME}/:sigq12 PATCHFILES+= daemontools-0.76.sigq12.patch:-p2:sigq12 .endif USE_RC_SUBR= svscan WRKSRC= ${WRKDIR}/admin/${DISTNAME}/src ALL_TARGET= it INSTALL_TARGET= setup check .if ${PORT_OPTIONS:MTESTS} EXTRA_PATCHES+= ${FILESDIR}/rts-skip.patch .endif post-patch: @${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc @${ECHO_CMD} "${CC} ${STRIP}" > ${WRKSRC}/conf-ld do-install: (while read cmd; do \ if ${FILE} ${WRKSRC}/$$cmd | ${GREP} -q "shell script"; then \ ${INSTALL_SCRIPT} ${WRKSRC}/$$cmd \ ${STAGEDIR}${PREFIX}/bin; \ else \ ${INSTALL_PROGRAM} ${WRKSRC}/$$cmd \ ${STAGEDIR}${PREFIX}/bin; \ fi \ done) < ${WRKSRC}/../package/commands .if ${PORT_OPTIONS:MMAN} ${INSTALL_MAN} ${WRKDIR}/daemontools-man/*.8 \ ${STAGEDIR}${MAN8PREFIX}/man/man8/ .endif .include Index: head/sysutils/daemontools/files/svscan.in =================================================================== --- head/sysutils/daemontools/files/svscan.in (revision 414545) +++ head/sysutils/daemontools/files/svscan.in (revision 414546) @@ -1,102 +1,102 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: svscan # REQUIRE: %%SVSCAN_REQUIRE%% # BEFORE: %%SVSCAN_BEFORE%% # KEYWORD: shutdown # Define these svscan_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/svscan # # svscan_enable Set to "YES" to run svscan. # svscan_servicedir The directory containing the various service. # directories to be monitored. Professor Daniel J. # Bernstein recommends "/service", but the FreeBSD # port has a default of "/var/service" instead, which # is consistent with the FreeBSD filesystem hierarchy # guidelines as described in the hier(7) manual page. # svscan_logdir If set, then svscan will not log its output through # readproctitle, but through multilog instead, and # the logs will be placed in the specified directory. # The FreeBSD port default is to run svscan through # readproctitle. # svscan_lognum The number of logfiles that multilog will keep if # svscan_logdir is set; the multilog default is 10. # svscan_logmax The maximum logfile size for multilog if svscan_logdir # is set; the multilog default is 99999. # It would really, really be a Good Thing(tm) for you to enable some # of the below control variables and the apropriate ulimit. # These are only examples. # Furthermore, you should think about additional limits you might need. # Or, check login.conf(5) for a suitable alternative. # If you want to use these examples, please place into /etc/rc.conf.d/svscan. # # I really do suggest you use /var/service as your service spool directory. # Check hier(7) for reasons. # 10 Mb #MINSEGMENT=10240 # 20 Mb #MAXSEGMENT=20480 # 10 Mb #MAXFILESIZE=10240 # 100 #MAXFD=100 # 40 #MAXCHILD=40 # ulimits #ulimit -d ${MINSEGMENT} #ulimit -f ${MAXFILESIZE} #ulimit -m ${MAXSEGMENT} #ulimit -n ${MAXFD} #ulimit -s ${MINSEGMENT} #ulimit -u ${MAXCHILD} . /etc/rc.subr name="svscan" rcvar=svscan_enable command="%%PREFIX%%/bin/svscan" # # DO NOT CHANGE THESE DEFAULT VALUES HERE # svscan_enable=${svscan_enable-"NO"} svscan_servicedir=${svscan_servicedir-"/var/service"} start_cmd="svscan_start" stop_postcmd="svscan_stop_post" load_rc_config $name required_dirs="${svscan_servicedir}" if [ -n "${svscan_logdir}" ]; then required_dirs="${required_dirs} ${svscan_logdir}" fi svscan_start () { echo "Starting svscan." EP="/usr/bin/env \ PATH=%%PREFIX%%/sbin:%%PREFIX%%/bin:/usr/sbin:/usr/bin:/sbin:/bin" if [ -z "${svscan_logdir}" ]; then - ${EP} /usr/sbin/daemon /bin/sh -c "$command $svscan_servicedir 2>&1 | %%PREFIX%%/bin/readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................ &" > /dev/null + ${EP} /usr/sbin/daemon -f /bin/sh -c "$command $svscan_servicedir 2>&1 | %%PREFIX%%/bin/readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................ &" else logmax=${svscan_logmax+s$svscan_logmax} lognum=${svscan_lognum+n$svscan_lognum} - ${EP} /usr/sbin/daemon /bin/sh -c "$command $svscan_servicedir 2>&1 \ - | %%PREFIX%%/bin/multilog t $logmax $lognum '${svscan_logdir}' &" > /dev/null + ${EP} /usr/sbin/daemon -f /bin/sh -c "$command $svscan_servicedir 2>&1 \ + | %%PREFIX%%/bin/multilog t $logmax $lognum '${svscan_logdir}' &" fi } svscan_stop_post () { find -L "$svscan_servicedir" -mindepth 1 -maxdepth 2 -type d -name '[^.]*' \( \! -path "$svscan_servicedir/*/*" -or -name 'log' \) -print0 | xargs -0 %%PREFIX%%/bin/svc -dx } run_rc_command "$1"