From 0d6ede240c8bbee7eedcc6f53ec05ab98cd9a512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Gerard?= Date: Thu, 27 Feb 2025 12:50:18 +0100 Subject: [PATCH 1/2] this fix is related to issue #1657 --- ncm-altlogrotate/src/main/perl/altlogrotate.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ncm-altlogrotate/src/main/perl/altlogrotate.pm b/ncm-altlogrotate/src/main/perl/altlogrotate.pm index 85d1fd0f2e..a66962d9d2 100755 --- a/ncm-altlogrotate/src/main/perl/altlogrotate.pm +++ b/ncm-altlogrotate/src/main/perl/altlogrotate.pm @@ -136,7 +136,7 @@ sub Configure } # Next process global config file - if (@globals) { + if (@globals || $overallglobal) { if ($overallglobal) { unshift @globals, 'global'; From a9b5fc0f78bc7e57e05d8951264738ed78176ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Gerard?= Date: Thu, 20 Mar 2025 13:21:34 +0100 Subject: [PATCH 2/2] if there is an entry named 'global', the @globals list will be empty when reaching the if of line 138, and if we don't check the value of $overallglobal (that is switched to 1 in case of an entry named 'global'), then the block of code modifying the global configuration file will be skipped --- ncm-altlogrotate/src/main/perl/altlogrotate.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ncm-altlogrotate/src/main/perl/altlogrotate.pm b/ncm-altlogrotate/src/main/perl/altlogrotate.pm index a66962d9d2..a29a11fd3a 100755 --- a/ncm-altlogrotate/src/main/perl/altlogrotate.pm +++ b/ncm-altlogrotate/src/main/perl/altlogrotate.pm @@ -135,7 +135,7 @@ sub Configure } } - # Next process global config file + # Next process the global config file if (@globals || $overallglobal) { if ($overallglobal) { unshift @globals, 'global';