1 |
--- webmin-1.220/init/init-lib.pl.deush 2005-07-20 21:06:28.410126659 +0200 |
2 |
+++ webmin-1.220/init/init-lib.pl 2005-07-20 21:08:45.984436969 +0200 |
3 |
@@ -96,6 +96,7 @@ |
4 |
return sort(@rv); |
5 |
} |
6 |
|
7 |
+sub member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 } |
8 |
|
9 |
=head2 list_actions |
10 |
|
11 |
@@ -60,15 +61,14 @@ |
12 |
$dir = $config{init_dir}; |
13 |
opendir(DIR, $dir); |
14 |
foreach $f (sort { lc($a) cmp lc($b) } readdir(DIR)) { |
15 |
- if ($f eq "." || $f eq ".." || $f =~ /\.bak$/ || $f eq "functions" || |
16 |
- $f eq "core" || $f eq "README" || $f eq "rc" || $f eq "rcS" || |
17 |
- -d "$dir/$f" || $f =~ /\.swp$/ || $f eq "skeleton" || |
18 |
- $f =~ /\.lock$/ || $f =~ /\.dpkg-(old|dist)$/ || |
19 |
- $f =~ /^\.depend\./) { next; } |
20 |
- if (@stbuf = stat("$dir/$f")) { |
21 |
- push(@rv, "$f $stbuf[1]"); |
22 |
- } |
23 |
- } |
24 |
+ next if (member($f, qw(. .. functions core README rc rcS skeleton)) |
25 |
+ || $f =~ /\.bak$/ || $f =~ /\.swp$/ || $f =~ /\.lock$/ |
26 |
+ || $f =~ /^mandrake/ || $f =~ /^\.depend\./ |
27 |
+ || -d "$dir/$f"); |
28 |
+ if (@stbuf = stat("$dir/$f")) { |
29 |
+ push(@rv, "$f $stbuf[1]"); |
30 |
+ } |
31 |
+} |
32 |
closedir(DIR); |
33 |
foreach $f (split(/\s+/, $config{'extra_init'})) { |
34 |
if (@stbuf = stat($f)) { |