Package: lighttpd
Version: 1.4.11-5
Severity: wishlist
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The attached patch simplifies the
/usr/share/lighttpd/include-conf-enabled.pl for different purporses:

- - It does not read the files and outputs them but outputs lighttp
  include directives, so errors are reported in the file the are and not
  some strange location in the output of a script.
- - Remove redundant sort and grep since glob already sorts and the glob
  pattern is strict enough.

- -- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.16-1-k7
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages lighttpd depends on:
ii  libbz2-1.0                    1.0.3-2    high-quality block-sorting file co
ii  libc6                         2.3.6-7    GNU C Library: Shared libraries
ii  libldap2                      2.1.30-13  OpenLDAP libraries
ii  libpcre3                      6.4-2      Perl 5 Compatible Regular Expressi
ii  libssl0.9.8                   0.9.8b-2   SSL shared libraries
ii  lsb-base                      3.1-5      Linux Standard Base 3.1 init scrip
ii  mime-support                  3.36-1     MIME files 'mime.types' & 'mailcap
ii  zlib1g                        1:1.2.3-11 compression library - runtime

Versions of packages lighttpd recommends:
pn  php4-cgi                      <none>     (no description available)
pn  php5-cgi                      <none>     (no description available)

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEcHjQGf7YPOK+o0ERAoSiAKDLFCmOJ+t75Y/mqb/lWhTxyezojwCdGo0O
l4HVq9whYY/stN0CmZq9C5s=
=juyA
-----END PGP SIGNATURE-----
--- /usr/share/lighttpd/include-conf-enabled.pl 2006-01-02 15:43:48.000000000 
+0100
+++ include-conf-enabled.pl     2006-05-21 16:12:10.368934529 +0200
@@ -3,21 +3,14 @@
 use strict;
 use File::Glob ':glob';
 
-my $confdir = "/etc/lighttpd/conf-enabled/";
+my $confdir = "/etc/lighttpd/";
+my $enabled = "conf-enabled/*.conf";
 
-#--- read filenames in $confdir, only with .conf extension counts
 chdir($confdir);
-my @files = bsd_glob('*.conf');
-
[EMAIL PROTECTED] = sort grep {/\.conf$/} @files;
+my @files = bsd_glob($enabled);
 
 for my $file (@files)
 {
-       open( FILE, "<", $file ) or die "Can't open file $file: $!";
-       print "## content of $file";
-       while (<FILE>)
-       {
-               chomp $_; print $_;
-       }
+       print "include \"$file\"";
 }
 

Reply via email to