diff options
author | Arno Töll <debian@toell.net> | 2012-03-12 23:24:48 +0100 |
---|---|---|
committer | Arno Töll <debian@toell.net> | 2012-03-12 23:24:48 +0100 |
commit | 28fddc923d6347896e9c4f159ac458937832ebe9 (patch) | |
tree | b899ddef76ab95f4c7f3e92e7f371776beb55a14 | |
parent | 68930adb12678db0840275cd5fc7dfdc252b3f45 (diff) | |
download | apache2-28fddc923d6347896e9c4f159ac458937832ebe9.tar.gz |
Update the bug report script a bit
-rw-r--r-- | debian/apache2-bin.bug-control | 2 | ||||
-rwxr-xr-x | debian/apache2-bin.bug-script (renamed from debian/apache2-data.bug-script) | 53 | ||||
-rw-r--r-- | debian/apache2-data.bug-control | 1 | ||||
-rw-r--r-- | debian/apache2.links | 3 |
4 files changed, 41 insertions, 18 deletions
diff --git a/debian/apache2-bin.bug-control b/debian/apache2-bin.bug-control new file mode 100644 index 00000000..9d1b4001 --- /dev/null +++ b/debian/apache2-bin.bug-control @@ -0,0 +1,2 @@ +report-with: apache2 apache2-bin apache2-data +package-status: apache2 apache2-bin diff --git a/debian/apache2-data.bug-script b/debian/apache2-bin.bug-script index 96e81f1e..8d957cb6 100755 --- a/debian/apache2-data.bug-script +++ b/debian/apache2-bin.bug-script @@ -6,23 +6,35 @@ $Text::Wrap::columns = 70; open (my $out, ">&=3") or die "could not open FD 3\n"; -my $apache = ". /etc/apache2/envvars && /usr/sbin/apache2"; -my $res = `$apache -t 2>&1`; +our $AQUERY = 0; +our $PHP = 0; + +if (-x "/usr/sbin/a2query") +{ + $AQUERY = "/usr/sbin/a2query"; +} + +if ($AQUERY) +{ + my $mpm = `$AQUERY -M`; + chomp($mpm); + print $out "Enabled MPM: $mpm\n"; +} + + my @modules; -my $php; -if ($res !~ "Syntax OK") { - # if we are not root, syntax check will fail because ssl private keys - # are not readable - print $out "Config file syntax check failed.\n" if $> == 0; +if ($AQUERY) +{ + print $out "List of enabled modules:\n"; + @modules = `$AQUERY -m`; +} +else +{ + print $out "a2query is not available.\n"; @modules = sort glob("/etc/apache2/mods-enabled/*.load"); map { s{^/etc/apache2/mods-enabled/(.*)\.load$}{$1} } @modules; print $out "List of /etc/apache2/mods-enabled/*.load:\n"; } -else { - @modules = sort `$apache -M 2>&1`; - @modules = map { /^ (.*)_module \(shared\)/ ? ($1) : () } @modules; - print $out "List of enabled modules from 'apache2 -M':\n"; -} if (! scalar @modules) { print $out "Could not determine module list\n"; } @@ -35,7 +47,7 @@ else { $missing = 1; } if ($m =~ /^(php\d)/) { - $php = $1; + $PHP = $1; } } @@ -47,14 +59,23 @@ else { "enabled in /etc/apache2/mods-enabled/)\n") if $missing; } -if (defined $php) { - my @exts = qx{egrep ^extension= /etc/$php/apache2/php.ini /etc/$php/apache2/conf.d/* 2>/dev/null}; + +if (defined $PHP) { + my @exts = qx{egrep ^extension= /etc/$PHP/apache2/php.ini /etc/$PHP/apache2/conf.d/* 2>/dev/null}; if (scalar @exts) { chomp @exts; @exts = grep { ! m{\.dpkg-(?:bak|dist):} } @exts; @exts = sort grep { s{^.*:extension=(\S+)\.\S+}{$1} } @exts; - print $out "List of enabled $php extensions:\n"; + print $out "List of enabled $PHP extensions:\n"; print $out wrap(" ", " ", "@exts\n"); } } + +if ($AQUERY) +{ + my @confs; + print $out "List of enabled configurations:\n"; + @confs = `$AQUERY -c`; + print $out wrap(" ", " ", "@confs\n"); +} diff --git a/debian/apache2-data.bug-control b/debian/apache2-data.bug-control deleted file mode 100644 index ca2aa384..00000000 --- a/debian/apache2-data.bug-control +++ /dev/null @@ -1 +0,0 @@ -package-status: apache2 apache2-bin diff --git a/debian/apache2.links b/debian/apache2.links index d780b14b..6f23c018 100644 --- a/debian/apache2.links +++ b/debian/apache2.links @@ -1,4 +1,5 @@ -usr/share/bug/apache2-data/script usr/share/bug/apache2/script +usr/share/bug/apache2-bin/script usr/share/bug/apache2/script +usr/share/bug/apache2-bin/control usr/share/bug/apache2/control usr/sbin/a2enmod usr/sbin/a2dismod usr/sbin/a2enmod usr/sbin/a2ensite usr/sbin/a2enmod usr/sbin/a2dissite |