[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#337817: apache2-common: grep complains if /etc/apache2/conf.d is empty



Subject: apache2-common: grep complains if /etc/apache2/conf.d is empty
Package: apache2-common
Version: 2.0.55-3
Severity: normal

Stopping apache2 shows an error message from grep:

grep: /etc/apache2/conf.d/[^.#]*: No such file

This happens when the above directory is empty (like on my computer). Some
cron script is restarting apache so I get an email from cron everytime.

To fix this, I added the option "-s" to grep to suppress the printing of
error
messages (see attached patch).

Thomas

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.10
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages apache2-common depends on:
ii  apache2-utils                 2.0.55-3   utility programs for webservers
ii  debconf                       1.4.58     Debian configuration management
sy
ii  debianutils                   2.15.1     Miscellaneous utilities
specific t
ii  libc6                         2.3.5-7    GNU C Library: Shared libraries
an
ii  libdb4.3                      4.3.29-1   Berkeley v4.3 Database
Libraries [
ii  libexpat1                     1.95.8-3   XML parsing C library - runtime
li
ii  libgcc1                       1:4.0.2-3  GCC support library
ii  libmagic1                     4.15-2     File type determination library
us
ii  lsb-base                      3.0-11     Linux Standard Base 3.0 init
scrip
ii  mime-support                  3.35-1     MIME files 'mime.types' &
'mailcap
ii  net-tools                     1.60-16    The NET-3 networking toolkit
ii  openssl                       0.9.8a-3   Secure Socket Layer (SSL)
binary a
ii  ssl-cert                      1.0-11     Simple debconf wrapper for
openssl

apache2-common recommends no packages.

-- no debconf information

-- 
Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie
--- apache2.orig	2005-10-23 06:41:08.000000000 +0200
+++ apache2	2005-11-06 18:21:12.334734928 +0100
@@ -37,7 +37,7 @@
 	# here, but only first-level includes are supported, not nested ones
 
 	for i in $AP_CONF `awk '$1 ~ /^\s*[Ii]nclude$/ && $2 ~ /^\// {print $2}' $AP_CONF`; do
-		PIDFILE=`grep -i ^PidFile $i | tail -n 1 | awk '{print $2}'`
+		PIDFILE=`grep -s -i ^PidFile $i | tail -n 1 | awk '{print $2}'`
 		if [ -e "$PIDFILE" ]; then
 			PID=`cat $PIDFILE`
 		fi

Reply to: