aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-06-06 20:08:02 +0000
committerNicolas Vigier <boklm@mageia.org>2013-06-06 20:08:02 +0000
commit72db6c762fdead109a7dfbe0686331ecea932718 (patch)
tree3e2325920efbf96edf79373e9c45849bba22a78c
parent61430e5441a273efe6e18b6229d399c263d6819c (diff)
downloadmgaadvisories-72db6c762fdead109a7dfbe0686331ecea932718.tar
mgaadvisories-72db6c762fdead109a7dfbe0686331ecea932718.tar.gz
mgaadvisories-72db6c762fdead109a7dfbe0686331ecea932718.tar.bz2
mgaadvisories-72db6c762fdead109a7dfbe0686331ecea932718.tar.xz
mgaadvisories-72db6c762fdead109a7dfbe0686331ecea932718.zip
mkadvisories: move config loading at the top
-rwxr-xr-xmkadvisories7
1 files changed, 3 insertions, 4 deletions
diff --git a/mkadvisories b/mkadvisories
index 0f767cb..3b207ca 100755
--- a/mkadvisories
+++ b/mkadvisories
@@ -14,6 +14,9 @@ my $config_file = '/usr/share/mga-advisories/config';
my $config = LoadFile($ENV{MGAADV_CONF} || $config_file);
my $etc_config_file = '/etc/mga-advisories.conf';
my $etc_config = LoadFile($etc_config_file);
+foreach my $k (keys %$etc_config) {
+ $config->{$k} = $etc_config->{$k};
+}
my @report_logs;
sub report_log {
@@ -26,10 +29,6 @@ sub report_exit {
exit 1;
}
-foreach my $k (keys %$etc_config) {
- $config->{$k} = $etc_config->{$k};
-}
-
sub status_file {
$config->{status_dir} . '/' . $_[0];
}