From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Nov 11 11:20:22 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0E2016A41F for ; Fri, 11 Nov 2005 11:20:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BD7443D46 for ; Fri, 11 Nov 2005 11:20:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jABBKGhn026585 for ; Fri, 11 Nov 2005 11:20:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jABBKGJ8026584; Fri, 11 Nov 2005 11:20:16 GMT (envelope-from gnats) Resent-Date: Fri, 11 Nov 2005 11:20:16 GMT Resent-Message-Id: <200511111120.jABBKGJ8026584@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Denis Shaposhnikov Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1A5A16A41F; Fri, 11 Nov 2005 11:14:44 +0000 (GMT) (envelope-from dsh@vlink.ru) Received: from deliver.smtp.vlink.ru (vlink-0.avtlg.ru [83.239.142.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C21443D45; Fri, 11 Nov 2005 11:14:43 +0000 (GMT) (envelope-from dsh@vlink.ru) Received: from smtp.smtp.vlink.ru (clamav.smtp.vlink.ru [192.168.4.1]) by deliver.smtp.vlink.ru (Postfix) with ESMTP id 69669FECF12; Fri, 11 Nov 2005 14:14:40 +0300 (MSK) Received: from neva.vlink.ru (neva.vlink.ru [217.107.252.29]) by smtp.smtp.vlink.ru (Postfix) with ESMTP id EDA621009B8B; Fri, 11 Nov 2005 14:14:39 +0300 (MSK) Received: from neva.vlink.ru (localhost [127.0.0.1]) by neva.vlink.ru (8.13.4/8.13.4) with ESMTP id jABBEbdF074458; Fri, 11 Nov 2005 14:14:37 +0300 (MSK) (envelope-from dsh@neva.vlink.ru) Received: (from dsh@localhost) by neva.vlink.ru (8.13.4/8.13.4/Submit) id jABBEbSb074455; Fri, 11 Nov 2005 14:14:37 +0300 (MSK) (envelope-from dsh) Message-Id: <200511111114.jABBEbSb074455@neva.vlink.ru> Date: Fri, 11 Nov 2005 14:14:37 +0300 (MSK) From: Denis Shaposhnikov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: clement@FreeBSD.org, dsh@neva.vlink.ru Subject: ports/88836: Update port: www/apache2 (fix harcoded pidfile in the rc script) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Denis Shaposhnikov List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Nov 2005 11:20:22 -0000 >Number: 88836 >Category: ports >Synopsis: Update port: www/apache2 (fix harcoded pidfile in the rc script) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Nov 11 11:20:15 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Denis Shaposhnikov >Release: FreeBSD 7.0-CURRENT i386 >Organization: >Environment: System: FreeBSD neva.vlink.ru 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Wed Oct 26 10:07:22 MSD 2005 dsh@neva.vlink.ru:/var/FreeBSD/obj/var/FreeBSD/src/sys/NEVA i386 >Description: The pidfile in the rc script is hardcoded to "/var/run/httpd.pid". But it possible to change PidFile directive in httpd.conf. I think it's better not to hardcode it in the rc script. >How-To-Repeat: Change PidFile in httpd.conf to something else and try to use /usr/local/etc/rc.d/apache2.sh >Fix: diff -Nru apache2.orig/files/apache.sh apache2/files/apache.sh --- apache2.orig/files/apache.sh Fri Nov 11 13:59:06 2005 +++ apache2/files/apache.sh Fri Nov 11 14:03:01 2005 @@ -23,6 +23,9 @@ # Extra flags passed to start command. # apache2limits_args (str): Default to "-e -C daemon" # Arguments of pre-start limits run. +# apache2_pidprefix (str): Default to "/var/run/httpd" +# Path to apache's pidfile without .pid +# suffix. # . %%RC_SUBR%% @@ -34,8 +37,6 @@ restart_precmd="apache2_checkconfig" reload_precmd="apache2_checkconfig" command="%%PREFIX%%/sbin/httpd" -_pidprefix="/var/run/httpd" -pidfile="${_pidprefix}.pid" required_files=%%PREFIX%%/etc/apache2/httpd.conf [ -z "${apache2_enable}" ] && apache2_enable="NO" @@ -46,6 +47,9 @@ [ -z "${apache2_configfile}" ] && apache2_configfile="" load_rc_config $name + +_pidprefix=${apache2_pidprefix:-"/var/run/httpd"} +pidfile="${_pidprefix}.pid" if [ -n "${2}" ]; then profile=${2} >Release-Note: >Audit-Trail: >Unformatted: