1 |
jcrisp |
1.1 |
diff -ruN smeserver-affa-3.3.1.old/root/sbin/affa smeserver-affa-3.3.1/root/sbin/affa |
2 |
|
|
--- smeserver-affa-3.3.1.old/root/sbin/affa 2021-12-01 10:49:03.264244761 +0000 |
3 |
|
|
+++ smeserver-affa-3.3.1/root/sbin/affa 2021-12-01 12:18:36.866259431 +0000 |
4 |
|
|
@@ -926,7 +926,7 @@ |
5 |
|
|
my @cfgfiles = getConfigFileList(); # only valid ones |
6 |
|
|
my @cmd = ( 'echo', '-n', '>', $configfile, ';', 'chmod', '400', $configfile, ';', 'cat' ); |
7 |
|
|
foreach my $s (@cfgfiles) { |
8 |
|
|
- push( @cmd, $s ); |
9 |
|
|
+ push( @cmd, '"'.$s.'"' ); |
10 |
|
|
} |
11 |
|
|
push( @cmd, '>' ); |
12 |
|
|
push( @cmd, $configfile ); |
13 |
|
|
@@ -1130,10 +1130,23 @@ |
14 |
|
|
|
15 |
|
|
sub getConfigFileList() { |
16 |
|
|
dbg('Fetching list of all config files'); |
17 |
|
|
- my @cmd = ( 'find', '/etc/affa/', '-type', 'f', '-name', '"*.conf"' ); |
18 |
|
|
- ExecCmd( @cmd, 0 ); |
19 |
|
|
- my @ret = (); |
20 |
|
|
- my @list = split( /[\r\n]/, $ExecCmdOut ); |
21 |
|
|
+ |
22 |
|
|
+ my @dirList = qw (/etc/affa/ /etc/affa/conf.d/); |
23 |
|
|
+ my @ls = (); |
24 |
|
|
+ |
25 |
|
|
+ foreach $dir (@dirList) { |
26 |
|
|
+ if ( -d $dir ) { |
27 |
|
|
+ my @cmd = ( |
28 |
|
|
+ 'find', "$dir", '-maxdepth 1', '-type', 'f', '-name', '"*.conf"' |
29 |
|
|
+ ); |
30 |
|
|
+ ExecCmd( @cmd, 0 ); |
31 |
|
|
+ @ls = split( /[\r\n]/, $ExecCmdOut ); |
32 |
|
|
+ @list = (@list, @ls); |
33 |
|
|
+ } |
34 |
|
|
+ } |
35 |
|
|
+ |
36 |
|
|
+ my @ret = (); |
37 |
|
|
+ |
38 |
|
|
foreach my $s (@list) { |
39 |
|
|
my $c = Config::IniFiles->new( -file => $s ); |
40 |
|
|
if ( not $c ) { |