From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-866841-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E2D611388C1 for <garchives@archives.gentoo.org>; Thu, 3 Mar 2016 13:03:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F2EE721C02B; Thu, 3 Mar 2016 13:03:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9748321C02B for <gentoo-commits@lists.gentoo.org>; Thu, 3 Mar 2016 13:03:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D3B96340BE3 for <gentoo-commits@lists.gentoo.org>; Thu, 3 Mar 2016 13:03:22 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DB6132090 for <gentoo-commits@lists.gentoo.org>; Thu, 3 Mar 2016 13:03:16 +0000 (UTC) From: "Lars Wendler" <polynomial-c@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" <polynomial-c@gentoo.org> Message-ID: <1457009186.d78bf0381f86d80fd06ca7f0818003afc09c26ec.polynomial-c@gentoo> Subject: [gentoo-commits] proj/apache:master commit in: 2.4/init/ X-VCS-Repository: proj/apache X-VCS-Files: 2.4/init/apache2.initd X-VCS-Directories: 2.4/init/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: d78bf0381f86d80fd06ca7f0818003afc09c26ec X-VCS-Branch: master Date: Thu, 3 Mar 2016 13:03:16 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0b366659-73d4-423f-bd39-fb54a4c1016c X-Archives-Hash: 3f18eee3eeaf34577f91d05dd109d235 commit: d78bf0381f86d80fd06ca7f0818003afc09c26ec Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> AuthorDate: Thu Jan 21 15:16:40 2016 +0000 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> CommitDate: Thu Mar 3 12:46:26 2016 +0000 URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=d78bf038 apache2.initd: apply default values for conf.d variables in one place. There are a few variables in the apache2 conf.d file that have default values. The default values were applied at various places in different commands, and often more than once. Since none of those variables need to be modified after the script has loaded, it makes more sense to set them once at the beginning of the script. 2.4/init/apache2.initd | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd index 0a1e6a0..50b6500 100755 --- a/2.4/init/apache2.initd +++ b/2.4/init/apache2.initd @@ -15,6 +15,13 @@ description_reload="Kills all children and reloads the configuration." description_virtualhosts="Show the settings as parsed from the config file (currently only shows the virtualhost settings)." description_stop="Kills all children and stops the server." +# Apply default values for some conf.d variables. +PIDFILE="${PIDFILE:-/var/run/apache2.pid}" +TIMEOUT=${TIMEOUT:-15} +SERVERROOT="${SERVERROOT:-/usr/lib/apache2}" +CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}" +RELOAD_TYPE="${RELOAD_TYPE:-graceful}" + depend() { need net use mysql dns logger netmount postgresql @@ -28,17 +35,11 @@ configtest() { } checkconfd() { - PIDFILE="${PIDFILE:-/var/run/apache2.pid}" - TIMEOUT=${TIMEOUT:-15} - - SERVERROOT="${SERVERROOT:-/usr/lib/apache2}" if [ ! -d ${SERVERROOT} ]; then eerror "SERVERROOT does not exist: ${SERVERROOT}" return 1 fi - CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}" - APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}" APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}" [ -n "${STARTUPERRORLOG}" ] && APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}" @@ -106,8 +107,6 @@ stop() { } reload() { - RELOAD_TYPE="${RELOAD_TYPE:-graceful}" - checkconfig || return 1 if [ "${RELOAD_TYPE}" = "restart" ]; then