From owner-freebsd-ports Thu May 9 23:10:38 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 4B4A637B406 for ; Thu, 9 May 2002 23:10:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g4A6A2f64096; Thu, 9 May 2002 23:10:02 -0700 (PDT) (envelope-from gnats) Received: from net2.dinoex.sub.org (net2.dinoex.de [212.184.201.182]) by hub.freebsd.org (Postfix) with ESMTP id 0BCBE37B416 for ; Thu, 9 May 2002 23:09:54 -0700 (PDT) Received: from home.dinoex.sub.org (home [217.6.200.196]) by net2.dinoex.sub.org (8.12.3/8.12.3) with ESMTP id g4A69QiS000856 for ; Fri, 10 May 2002 08:09:28 +0200 (CEST) (envelope-from dm@home.dinoex.sub.org) Received: (from dm@localhost) by home.dinoex.sub.org (8.12.3/8.12.2/Submit) id g4A67CPS008393; Fri, 10 May 2002 08:07:12 +0200 (CEST) (envelope-from dm) Message-Id: <200205100607.g4A67CPS008393@home.dinoex.sub.org> Date: Fri, 10 May 2002 08:07:12 +0200 (CEST) From: dirk.meyer@dinoex.sub.org Reply-To: dirk.meyer@dinoex.sub.org To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/37917: [PATCH] ports does not support local_startup in rc.conf Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 37917 >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:10: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 squid24/Makefile squid24/Makefile --- squid24/Makefile Sat Mar 23 05:38:35 2002 +++ squid24/Makefile Sat Apr 20 17:22:40 2002 @@ -95,6 +95,9 @@ post-extract: @${PERL} -pi -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 @@ -117,7 +120,7 @@ ${CHOWN} nobody:nogroup ${PREFIX}/squid/cache @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 diff squid24/files/squid.sh squid24/files/squid.sh --- squid24/files/squid.sh Sat Sep 1 10:34:14 2001 +++ squid24/files/squid.sh Sun Apr 21 05:58:19 2002 @@ -1,25 +1,23 @@ #!/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) - if [ -x ${PREFIX}/sbin/squid -a -f ${PREFIX}/etc/squid/squid.conf ]; then - (cd /${PREFIX}/squid/logs; ${PREFIX}/sbin/squid >/dev/null 2>&1 &) ; echo -n ' squid' + if [ -x %%PREFIX%%/sbin/squid -a -f %%PREFIX%%/etc/squid/squid.conf ]; then + (cd /%%PREFIX%%/squid/logs; %%PREFIX%%/sbin/squid >/dev/null 2>&1 &) ; echo -n ' squid' fi ;; stop) - ${PREFIX}/sbin/squid -k shutdown 2>&1 + %%PREFIX%%/sbin/squid -k shutdown 2>&1 # Uncomment this if you'd like the system to (attempt to # wait for) squid to shut down cleanly #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 >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message