aboutsummaryrefslogtreecommitdiffstats
path: root/iurt2
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2010-11-10 12:58:50 +0000
committerNicolas Vigier <boklm@mageia.org>2010-11-10 12:58:50 +0000
commite3eff1464f5be5bcf83637101b2d2028d65cf576 (patch)
tree6e87ba447c077aea86e08afc6d3846947e65127c /iurt2
parentb7154169745a25a862b2b0a3b345cfe16cfc1046 (diff)
downloadiurt-e3eff1464f5be5bcf83637101b2d2028d65cf576.tar
iurt-e3eff1464f5be5bcf83637101b2d2028d65cf576.tar.gz
iurt-e3eff1464f5be5bcf83637101b2d2028d65cf576.tar.bz2
iurt-e3eff1464f5be5bcf83637101b2d2028d65cf576.tar.xz
iurt-e3eff1464f5be5bcf83637101b2d2028d65cf576.zip
apply patch from blino to use config file from /etc/iurt
Diffstat (limited to 'iurt2')
-rwxr-xr-xiurt218
1 files changed, 10 insertions, 8 deletions
diff --git a/iurt2 b/iurt2
index 709bdc1..e207cb3 100755
--- a/iurt2
+++ b/iurt2
@@ -388,14 +388,16 @@ my $real_arch = `uname -m`;
chomp $real_arch;
my $HOME = $ENV{HOME};
my $configfile = "$HOME/.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 $sysconfigfile = "/etc/iurt/$run{distro_tag}.conf";
+
+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}) {