mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Make the startup script also work on older versions of FreeBSD which
lack the daemon(8) utility.
This commit is contained in:
parent
14a90cd590
commit
87f39b0573
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=114845
2 changed files with 11 additions and 3 deletions
|
@ -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>
|
||||
|
|
|
@ -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 () {
|
||||
|
|
Loading…
Add table
Reference in a new issue