Bug#379015: apache2-common: Ugly error messages when /etc/apache2/conf.d/ is empty

2006-07-21 Thread Marc Chantreux

hello,

this bug was reported again and again. patches are provided by users in 
the BTS but not integrated.


regards.




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#350119: eliminate grep error message

2006-06-11 Thread Marc Chantreux
le 31/03/2006,
Miklos Quartus nous écrivait :
 You might as well eliminate the grep error message. This comes when
 there is no config file found in /etc/apach2/conf.d directory. The error
 message is displayed on console or normal output when I stop apache2:
 
 # /etc/init.d/apache2 stop
 Stopping apache 2.0 web server...grep: /etc/apache2/conf.d/[^.#]*: No
 such file or directory

my patch fix it :)

  PIDFILE=`grep -i ^PidFile $i | tail -n 1 | awk '{print $2}'`

without pipe ? 

PIDFILE=$( awk '
/^PidFile/ { r=$2}
END{ print r }
' $i ) 



-- 
téléphone : 03.90.24.00.19
courriel  : [EMAIL PROTECTED]
---



Bug#350119: apache2-common: better pidfile search (patch provided)

2006-01-27 Thread Marc Chantreux
Package: apache2-common
Version: 2.0.55-4
Severity: important


This patch add recursive inclusion while searching pidfile and fixes the fact
that apache2 doesn't stop when /etc/apache2/conf.d is empty.

hth,
regards
mc

29a30,43
 # find_and_execute_globs
 # search all apache configuration files included by the files passed as 
 arguments.
 # ( act recursively )
 # strictly Bourne compliant globs are incompatibles with the Apache 
 configuration one
 # ( [^.#] doesn't mean the same, for exemple ) so this function needs bash or 
 zsh to work.
 
 find_and_execute_globs () {
 shopt -s nullglob
 glob=$( awk '$1 ~ /^\s*[Ii]nclude$/  $2 ~ /^\// {print $2}' $* )
 echo $glob
 # comment the next line to stop recursion 
 [ -n $glob ]  find_and_execute_globs $glob
 }
 
31,32d44
   PID=
   PIDFILE=
36,37c48,54
   # last found in the config is used; we attempt to follow includes
   # here, but only first-level includes are supported, not nested ones
---
   # last found in the config is used
 
   PID=$( cat $( awk '
   BEGIN { IGNORECASE=1 }
   /^PidFile/ { pid=$2 }
   END { print pid }
   ' $AP_CONF $( find_and_execute_globs $AP_CONF )))
39,45d55
   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}'`
   if [ -e $PIDFILE ]; then
   PID=`cat $PIDFILE`
   fi
   done
   


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (900, 'stable'), (300, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.8-1-386
Locale: LANG=fr_FR, LC_CTYPE=fr_FR (charmap=ISO-8859-1)

Versions of packages apache2-common depends on:
ii  apache2-utils 2.0.55-4   utility programs for webservers
ii  debconf   1.4.67 Debian configuration management sy
ii  debianutils   2.15.2 Miscellaneous utilities specific t
ii  libc6 2.3.5-8GNU C Library: Shared libraries an
ii  libdb4.3  4.3.29-3   Berkeley v4.3 Database Libraries [
ii  libexpat1 1.95.8-3   XML parsing C library - runtime li
ii  libgcc1   1:4.0.2-5  GCC support library
ii  libmagic1 4.15-2 File type determination library us
ii  lsb-base  3.0-14 Linux Standard Base 3.0 init scrip
ii  mime-support  3.35-1 MIME files 'mime.types'  'mailcap
ii  net-tools 1.60-17The NET-3 networking toolkit
ii  openssl   0.9.8a-6   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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]