diff options
author | Anders Nordby <anders@FreeBSD.org> | 2002-08-13 21:39:47 +0000 |
---|---|---|
committer | Anders Nordby <anders@FreeBSD.org> | 2002-08-13 21:39:47 +0000 |
commit | 1d3d4ec4597b8c52210b1b65a89dafc25a22133c (patch) | |
tree | 5e02d63380f8079c59e11092943ce23526a95c2c /www | |
parent | 29370d3dee624a43df8669a4d27f27ba751f8bf4 (diff) | |
download | ports-1d3d4ec4597b8c52210b1b65a89dafc25a22133c.tar.gz ports-1d3d4ec4597b8c52210b1b65a89dafc25a22133c.zip |
Fix startup-script for -current /bin/sh issues, and set PREFIX during
install.
Requested by: obrien
Notes
Notes:
svn path=/head/; revision=64476
Diffstat (limited to 'www')
-rw-r--r-- | www/thttpd/Makefile | 2 | ||||
-rw-r--r-- | www/thttpd/files/thttpd.sh | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/www/thttpd/Makefile b/www/thttpd/Makefile index 8b0e043ec401..f0801ba53539 100644 --- a/www/thttpd/Makefile +++ b/www/thttpd/Makefile @@ -20,6 +20,7 @@ MAINTAINER= anders@FreeBSD.org IGNOREFILES= notes.html GNU_CONFIGURE= yes +USE_REINPLACE= yes MAN1= makeweb.1 htpasswd.1 MAN8= thttpd.8 redirect.8 ssi.8 syslogtocern.8 @@ -61,6 +62,7 @@ do-install: @if [ ! -f ${PREFIX}/etc/rc.d/thttpd.sh ]; then \ ${ECHO} "Installing ${PREFIX}/etc/rc.d/thttpd.sh startup file."; \ ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/thttpd.sh ${PREFIX}/etc/rc.d/thttpd.sh; \ + ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${PREFIX}/etc/rc.d/thttpd.sh; \ fi .if !defined(NOPORTDOCS) @${MKDIR} ${PREFIX}/share/doc/thttpd diff --git a/www/thttpd/files/thttpd.sh b/www/thttpd/files/thttpd.sh index 6129c1145d58..e559a172d3f6 100644 --- a/www/thttpd/files/thttpd.sh +++ b/www/thttpd/files/thttpd.sh @@ -1,13 +1,11 @@ #!/bin/sh -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then - echo "$0: Cannot determine the PREFIX" >&2 - exit 1 -fi - case "$1" in start) - [ -x ${PREFIX}/sbin/thttpd_wrapper ] && ${PREFIX}/sbin/thttpd_wrapper & && echo -n ' thttpd' + if [ -x %%PREFIX%%/sbin/thttpd_wrapper ]; then + %%PREFIX%%/sbin/thttpd_wrapper & + echo -n ' thttpd' + fi ;; stop) kill `cat /var/run/thttpd_wrapper.pid` && killall thttpd && echo -n ' thttpd' |