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

Bug#627061: multi-apache-setup: init-script fails to set correct ENVVAR if started from rcX.d



Package: apache2.2-common
Version: 2.2.16-6
Severity: important

Hi,

the apache init script allows multiple-instances setup by determining
the procname when called.

When called from rcX.d (eg. during the boot process) procname is
S99apache2-myinstance, which does not match in lines 20 and 21 in the
init scripts, which causes the wrong DIR_SUFFIX, APACHE_CONFDIR and
APACHE_ENVVARS to be set.

I fixed that a bit dirty for now with:

-elif [ "${0##*/apache2-}" != "$0" ] ; then
-       DIR_SUFFIX="-${0##*/apache2-}"
+elif [ "${0##*/*apache2-}" != "$0" ] ; then
+       DIR_SUFFIX="-${0##*/*apache2-}"
        APACHE_CONFDIR=/etc/apache2$DIR_SUFFIX

More correctly it should only look for apache2, S??apache2- and
K??apache2-.

Cheers,
Martin

-- Package-specific info:
List of enabled modules from 'apache2 -M':
  alias auth_basic authn_file authz_default authz_groupfile
  authz_host authz_user autoindex cgi deflate dir env mime
  negotiation php5 reqtimeout setenvif status userdir
List of enabled php5 extensions:
  gd pdo

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages apache2.2-common depends on:
ii  apache2-utils                 2.2.17-3   utility programs for webservers
ii  apache2.2-bin                 2.2.17-3   Apache HTTP Server common binary f
ii  lsb-base                      3.2-27     Linux Standard Base 3.2 init scrip
ii  mime-support                  3.51-1     MIME files 'mime.types' & 'mailcap
ii  perl                          5.12.3-6   Larry Wall's Practical Extraction 
ii  procps                        1:3.2.8-10 /proc file system utilities

Versions of packages apache2.2-common recommends:
ii  ssl-cert                      1.0.28     simple debconf wrapper for OpenSSL

Versions of packages apache2.2-common suggests:
pn  apache2-doc         <none>               (no description available)
pn  apache2-suexec | ap <none>               (no description available)
ii  chromium [www-brows 11.0.696.65~r84435-1 Chromium browser
ii  conkeror [www-brows 0.9.3+git110307-2    keyboard focused web browser with 
ii  elinks [www-browser 0.12~pre5-3.2+b1     advanced text-mode WWW browser
ii  epiphany-browser [w 2.30.6-2             Intuitive GNOME web browser
ii  galeon [www-browser 2.0.7-2.1+b1         GNOME web browser for advanced use
ii  iceweasel [www-brow 3.5.19-2             Web browser based on Firefox
ii  konqueror [www-brow 4:4.4.5-3            advanced file manager, web browser
ii  links [www-browser] 2.3~pre1-1+b1        Web browser running in text mode
ii  lynx-cur [www-brows 2.8.8dev.8-1         Text-mode WWW Browser with NLS sup
ii  w3m [www-browser]   0.5.3-2+b1           WWW browsable pager with excellent

Versions of packages apache2.2-common is related to:
pn  apache2-mpm-event             <none>     (no description available)
pn  apache2-mpm-itk               <none>     (no description available)
ii  apache2-mpm-prefork           2.2.17-3   Apache HTTP Server - traditional n
pn  apache2-mpm-worker            <none>     (no description available)

-- Configuration Files:
/etc/apache2/apache2.conf changed [not included]
/etc/apache2/mods-available/userdir.conf changed [not included]
/etc/apache2/sites-available/default changed [not included]

-- no debconf information

-- 
 Martin Zobel-Helas <zobel@debian.org>  | Debian System Administrator
 Debian & GNU/Linux Developer           |           Debian Listmaster
 GPG key http://go.debian.net/B11B627B  | 
 GPG Fingerprint:  6B18 5642 8E41 EC89 3D5D  BDBB 53B1 AC6D B11B 627B 



Reply to: