Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 May 2002 08:10:37 +0200 (CEST)
From:      dirk.meyer@dinoex.sub.org
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/37918: [PATCH] ports does not support local_startup in rc.conf
Message-ID:  <200205100610.g4A6AbE8008495@home.dinoex.sub.org>

next in thread | raw e-mail | index | archive | help

>Number:         37918
>Category:       ports
>Synopsis:       [PATCH] ports does not support local_startup in rc.conf
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 09 23:20:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Dirk Meyer
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
privat
>Environment:
System: FreeBSD 4.5-STABLE i386

>Description:

	startscript does not work in other directories.

>How-To-Repeat:

Use a diffrent startup-dir so builds don't add services or samples.
/etc/rc.conf:
local_startup="/usr/local/etc/rc.local"

>Fix:

	Apply this patch:

diff apache13+ipv6/Makefile apache13+ipv6/Makefile
--- apache13+ipv6/Makefile	Sun Dec  9 01:39:30 2001
+++ apache13+ipv6/Makefile	Fri Apr 19 19:29:09 2002
@@ -65,13 +65,17 @@
 MAN1=		dbmmanage.1 htdigest.1 htpasswd.1
 MAN8=		ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8
 
+post-extract:
+	@${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/apache.sh \
+		> ${WRKSRC}/apache.sh
+
 pre-install:
 	PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL
 
 post-install:
 	@if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \
 		${ECHO} "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \
-		${INSTALL_SCRIPT} -m 751 ${FILESDIR}/apache.sh ${PREFIX}/etc/rc.d/apache.sh; \
+		${INSTALL_SCRIPT} -m 751 ${WRKSRC}/apache.sh ${PREFIX}/etc/rc.d/apache.sh; \
 	fi
 
 .include <bsd.port.mk>
diff apache13+ipv6/files/apache.sh apache13+ipv6/files/apache.sh
--- apache13+ipv6/files/apache.sh	Wed Aug  9 04:16:31 2000
+++ apache13+ipv6/files/apache.sh	Fri Apr 19 19:30:08 2002
@@ -1,16 +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/apachectl ] && ${PREFIX}/sbin/apachectl start > /dev/null && echo -n ' apache'
+	[ -x %%PREFIX%%/sbin/apachectl ] && %%PREFIX%%/sbin/apachectl start > /dev/null && echo -n ' apache'
 	;;
 stop)
-	[ -r /var/run/httpd.pid ] && ${PREFIX}/sbin/apachectl stop > /dev/null && echo -n ' apache'
+	[ -r /var/run/httpd.pid ] && %%PREFIX%%/sbin/apachectl stop > /dev/null && echo -n ' apache'
 	;;
 *)
 	echo "Usage: `basename $0` {start|stop}" >&2
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205100610.g4A6AbE8008495>