Bug 37917

Summary: [PATCH] squid24 does not support local_startup in rc.conf
Product: Ports & Packages Reporter: dirk.meyer <dirk.meyer>
Component: Individual Port(s)Assignee: Adrian Chadd <adrian>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description dirk.meyer 2002-05-10 07:10:01 UTC
	startscript does not work in other directories.

Fix: Apply this patch:

diff squid24/Makefile squid24/Makefile
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"
Comment 1 Ying-Chieh Liao freebsd_committer freebsd_triage 2002-05-10 07:30:37 UTC
Responsible Changed
From-To: freebsd-ports->adrian

over to maintainer
Comment 2 dirk.meyer 2003-06-01 07:58:14 UTC
Updated PATCH:

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/www/squid24/Makefile,v
retrieving revision 1.96
diff -u -r1.96 Makefile
--- Makefile	7 Mar 2003 06:12:54 -0000	1.96
+++ Makefile	1 Jun 2003 06:56:37 -0000
@@ -102,6 +102,8 @@
 post-extract:
 	@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \
 		${WRKSRC}/configure
+	@${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/squid.sh \
+		> ${WRKSRC}/squid.sh
 
 post-install:
 #	I don't think many people use the pinger nowadays, and if you
@@ -128,7 +130,7 @@
 	fi
 	@if [ ! -f ${PREFIX}/etc/rc.d/squid.sh ]; then \
 		${ECHO} "Installing ${PREFIX}/etc/rc.d/squid.sh startup file."; \
-		${INSTALL_SCRIPT} -m 751 ${FILESDIR}/squid.sh ${PREFIX}/etc/rc.d/squid.sh; \
+		${INSTALL_SCRIPT} -m 751 ${WRKSRC}/squid.sh ${PREFIX}/etc/rc.d/squid.sh; \
 	fi
 
 .include <bsd.port.mk>
Index: files/squid.sh
===================================================================
RCS file: /home/pcvs/ports/www/squid24/files/squid.sh,v
retrieving revision 1.2
diff -u -r1.2 squid.sh
--- files/squid.sh	1 Sep 2001 08:34:14 -0000	1.2
+++ files/squid.sh	1 Jun 2003 06:56:37 -0000
@@ -1,9 +1,6 @@
 #!/bin/sh
 
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
-    echo "$0: Cannot determine the PREFIX" >&2
-    exit 1
-fi
+PREFIX=%%PREFIX%%
 
 case "$1" in
 start)
@@ -18,8 +15,11 @@
 		#echo "Sleeping for 45 seconds to allow squid to shutdown.."
 		#sleep 45 
 	;;
+restart)
+		${PREFIX}/sbin/squid -k reconfigure
+	;;
 *)
-	echo "Usage: `basename $0` {start|stop}" >&2
+	echo "Usage: `basename $0` {start|stop|restart}" >&2
 	;;
 esac
Comment 3 Dirk Meyer freebsd_committer freebsd_triage 2003-07-25 19:12:04 UTC
State Changed
From-To: open->closed

committed after maintainer/commiter timeout (1 year)