blob: 42c5bfd1aaf768bca13cc981d941a7415204bdf2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
Index: iurt2
===================================================================
--- iurt2 (revision 103)
+++ iurt2 (working copy)
@@ -388,14 +388,16 @@
chomp $real_arch;
my $HOME = $ENV{HOME};
my $configfile = "$HOME/.iurt.$run{distro_tag}.conf";
+my $sysconfigfile = "/etc/iurt/$run{distro_tag}.conf";
-plog('DEBUG', "load config: $configfile");
-my $config;
-if (-f $configfile) {
- $config = eval(cat_($configfile))
- or die "FATAL $program_name: syntax error in $configfile";
-} else {
- $config = {};
+my $config = {};
+foreach my $f ($configfile, $sysconfigfile) {
+ plog('DEBUG', "load config: $f");
+ if (-f $f) {
+ $config = eval(cat_($f))
+ or die "FATAL $program_name: syntax error in $f";
+ last;
+ }
}
if ($run{repository}) {
|