diff options
author | roam <roam@FreeBSD.org> | 2004-07-27 14:27:07 +0800 |
---|---|---|
committer | roam <roam@FreeBSD.org> | 2004-07-27 14:27:07 +0800 |
commit | 4fe563a5a95e6d63b21884b18f00bf70555b8649 (patch) | |
tree | 8901b03c65a89de670a3e2fece28d7b60667f3b2 /sysutils/daemontools | |
parent | 1f324ed01a308f128deabf57d1426bca557c1f1d (diff) | |
download | freebsd-ports-gnome-4fe563a5a95e6d63b21884b18f00bf70555b8649.tar.gz freebsd-ports-gnome-4fe563a5a95e6d63b21884b18f00bf70555b8649.tar.zst freebsd-ports-gnome-4fe563a5a95e6d63b21884b18f00bf70555b8649.zip |
Make the startup script also work on older versions of FreeBSD which
lack the daemon(8) utility.
Diffstat (limited to 'sysutils/daemontools')
-rw-r--r-- | sysutils/daemontools/Makefile | 12 | ||||
-rw-r--r-- | sysutils/daemontools/files/svscan.sh.sample | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/sysutils/daemontools/Makefile b/sysutils/daemontools/Makefile index 72f54a289704..a6cb3238919f 100644 --- a/sysutils/daemontools/Makefile +++ b/sysutils/daemontools/Makefile @@ -7,7 +7,7 @@ PORTNAME= daemontools PORTVERSION= 0.76 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= sysutils MASTER_SITES= http://cr.yp.to/daemontools/ \ ftp://cr.yp.to/daemontools/ @@ -40,6 +40,14 @@ INSTALL_TARGET= setup check SAMPLERC= svscan.sh.sample SERVICEDIR?= /var/service +.include <bsd.port.pre.mk> + +.if ${OSVERSION} >= 500023 || ${OSVERSION} < 500000 && ${OSVERSION} >= 460102 +RC_SCRIPTS_SUB+= DAEMON="/usr/sbin/daemon -f" +.else +RC_SCRIPTS_SUB+= DAEMON="" +.endif + post-patch: @${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc @${ECHO_CMD} "${CC} ${STRIP}" > ${WRKSRC}/conf-ld @@ -63,4 +71,4 @@ post-install: @${INSTALL_MAN} ${WRKDIR}/daemontools-man/*.8 ${PREFIX}/man/man8/ .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/sysutils/daemontools/files/svscan.sh.sample b/sysutils/daemontools/files/svscan.sh.sample index 7516fe93c851..194f66f486aa 100644 --- a/sysutils/daemontools/files/svscan.sh.sample +++ b/sysutils/daemontools/files/svscan.sh.sample @@ -63,7 +63,7 @@ svscan_start () { echo "Starting svscan." /usr/bin/env \ PATH=%%PREFIX%%/sbin:%%PREFIX%%/bin:/usr/sbin:/usr/bin:/sbin:/bin \ - /usr/sbin/daemon -f /bin/sh -c "$command $svscan_servicedir 2>&1 | %%PREFIX%%/bin/readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................ &" + %%DAEMON%% /bin/sh -c "$command $svscan_servicedir 2>&1 | %%PREFIX%%/bin/readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................ &" > /dev/null } svscan_stop_post () { |