summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2006-02-22 18:06:27 +0000
committerDaouda Lo <daouda@mandriva.com>2006-02-22 18:06:27 +0000
commit8bcc30ce5654e4b8b63d74fdb6d841523a0d3867 (patch)
treeeb7e3fd18a76fc212f72b829bb93221011e29cac
parentabc1ebf7188b89fd242a628e7e1b99f7e41b5da0 (diff)
downloadmgaonline-8bcc30ce5654e4b8b63d74fdb6d841523a0d3867.tar
mgaonline-8bcc30ce5654e4b8b63d74fdb6d841523a0d3867.tar.gz
mgaonline-8bcc30ce5654e4b8b63d74fdb6d841523a0d3867.tar.bz2
mgaonline-8bcc30ce5654e4b8b63d74fdb6d841523a0d3867.tar.xz
mgaonline-8bcc30ce5654e4b8b63d74fdb6d841523a0d3867.zip
- fix readconf API
- added alias to make mdkonline more consistent
-rw-r--r--mdkonline.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/mdkonline.pm b/mdkonline.pm
index 2401f3f5..91a9dfe5 100644
--- a/mdkonline.pm
+++ b/mdkonline.pm
@@ -289,8 +289,8 @@ if [ -f $conf_file ]; then /usr/sbin/mdkupdate --auto; fi
}
sub read_conf() {
- my %rc = getVarsFromSh($rootconf_file); my %wc = getVarsFromSh($conf_file);
- (\%wc, \%rc)
+ my %wc = getVarsFromSh($conf_file);
+ \%wc
}
sub write_conf {
@@ -310,7 +310,11 @@ sub write_wide_conf {
# print Dumper($soap_response);
my $date = get_date(); my $conf_hash;
$conf_hash->{uc($_)} = $soap_response->{data}->{$_} foreach (keys %{$soap_response->{data}});
+ print Dumper $conf_hash;
$conf_hash->{DATE_SET} = $date;
+ foreach my $alias (['email','user_email'], ['customer_id', 'user_id']) {
+ exists $conf_hash->{uc($alias->[0])} and $conf_hash->{uc($alias->[1])} = $conf_hash->{uc($alias->[0])};
+ }
setVarsInSh($conf_file, $conf_hash, qw(USER_EMAIL USER_ID HOST_NAME HOST_ID HOST_KEY HOST_DESC HOST_MOBILE VERSION DATE_SET));
}