From 8bcc30ce5654e4b8b63d74fdb6d841523a0d3867 Mon Sep 17 00:00:00 2001 From: Daouda Lo Date: Wed, 22 Feb 2006 18:06:27 +0000 Subject: - fix readconf API - added alias to make mdkonline more consistent --- mdkonline.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mdkonline.pm') 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)); } -- cgit v1.2.1