/[smecontribs]/rpms/smeserver-affa/contribs10/smeserver-affa-fix-config-directory-name-spaces.patch
ViewVC logotype

Contents of /rpms/smeserver-affa/contribs10/smeserver-affa-fix-config-directory-name-spaces.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Sun Nov 12 13:53:08 2023 UTC (12 months, 2 weeks ago) by jcrisp
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Import smeserver-affa-4

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 ) {

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed