diff options
author | Peter Pentchev <roam@FreeBSD.org> | 2007-10-30 10:49:16 +0000 |
---|---|---|
committer | Peter Pentchev <roam@FreeBSD.org> | 2007-10-30 10:49:16 +0000 |
commit | fd6405d10d4c27a4190142e23049bf085243c119 (patch) | |
tree | b67613ecd7373bf2c70d5e6a5fac163a5f286c95 /sysutils/daemontools | |
parent | 96b84474e090842a3ab0f3d65d645fe297f41443 (diff) | |
download | ports-fd6405d10d4c27a4190142e23049bf085243c119.tar.gz ports-fd6405d10d4c27a4190142e23049bf085243c119.zip |
Notes
Diffstat (limited to 'sysutils/daemontools')
-rw-r--r-- | sysutils/daemontools/Makefile | 7 | ||||
-rw-r--r-- | sysutils/daemontools/files/rts-skip.patch | 11 | ||||
-rw-r--r-- | sysutils/daemontools/files/svscan.sh.sample | 38 |
3 files changed, 50 insertions, 6 deletions
diff --git a/sysutils/daemontools/Makefile b/sysutils/daemontools/Makefile index cdedc2ee4214..b7c037affb9b 100644 --- a/sysutils/daemontools/Makefile +++ b/sysutils/daemontools/Makefile @@ -17,7 +17,8 @@ MAINTAINER= roam@FreeBSD.org COMMENT= Service monitoring and logging utilities by djb OPTIONS= MAN "Install Gerrit Pape's manual pages" on \ - SIGQ12 "Add svc support for QUIT, USR1, and USR2 signals" off + 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> @@ -59,6 +60,10 @@ RC_SCRIPTS_SUB+= DAEMON="/usr/sbin/daemon -f" RC_SCRIPTS_SUB+= DAEMON="" .endif +.if defined(WITHOUT_TESTS) +EXTRA_PATCHES+= ${FILESDIR}/rts-skip.patch +.endif + post-patch: @${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc @${ECHO_CMD} "${CC} ${STRIP}" > ${WRKSRC}/conf-ld diff --git a/sysutils/daemontools/files/rts-skip.patch b/sysutils/daemontools/files/rts-skip.patch new file mode 100644 index 000000000000..3dfd0efc6d01 --- /dev/null +++ b/sysutils/daemontools/files/rts-skip.patch @@ -0,0 +1,11 @@ +--- Makefile.old 2007-10-30 12:18:08.000000000 +0200 ++++ Makefile 2007-10-30 12:18:16.000000000 +0200 +@@ -264,7 +264,7 @@ + rts: envdir envuidgid fghack matchtest multilog pgrphack \ + readproctitle rts.tests setlock setuidgid softlimit supervise svc \ + svok svscan svscanboot svstat tai64n tai64nlocal +- env - /bin/sh rts.tests 2>&1 | cat -v > rts ++ echo env - /bin/sh rts.tests 2>&1 | cat -v > rts + + scan_ulong.o: compile scan.h scan_ulong.c + ./compile scan_ulong.c diff --git a/sysutils/daemontools/files/svscan.sh.sample b/sysutils/daemontools/files/svscan.sh.sample index 87ca26a5e9e3..2aa1b2432fb0 100644 --- a/sysutils/daemontools/files/svscan.sh.sample +++ b/sysutils/daemontools/files/svscan.sh.sample @@ -11,8 +11,22 @@ # /etc/rc.conf.local # /etc/rc.conf.d/svscan # -# DO NOT CHANGE THESE DEFAULT VALUES HERE -# +# svscan_enable Set to "YES" to run svscan. +# svscan_servicedir The directory containing the various service. +# directories to be monitored. Professor Daniel J. +# Bernstein recomments "/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. @@ -48,6 +62,10 @@ name="svscan" rcvar=`set_rcvar` command="%%PREFIX%%/bin/svscan" + +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# svscan_enable=${svscan_enable-"NO"} svscan_servicedir=${svscan_servicedir-"/var/service"} @@ -57,12 +75,22 @@ 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." - /usr/bin/env \ - PATH=%%PREFIX%%/sbin:%%PREFIX%%/bin:/usr/sbin:/usr/bin:/sbin:/bin \ - %%DAEMON%% /bin/sh -c "$command $svscan_servicedir 2>&1 | %%PREFIX%%/bin/readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................ &" > /dev/null + EP="/usr/bin/env \ + PATH=%%PREFIX%%/sbin:%%PREFIX%%/bin:/usr/sbin:/usr/bin:/sbin:/bin" + if [ -z "${svscan_logdir}" ]; then + ${EP} %%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 \ + | %%PREFIX%%/bin/multilog t $logmax $lognum '${svscan_logdir}' &" > /dev/null + fi } svscan_stop_post () { |