diff options
author | Thierry Vignaud <tv@mandriva.org> | 2006-09-21 12:42:48 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2006-09-21 12:42:48 +0000 |
commit | 88a068d6f57529daffe4bca5bfe74685a4e9afd8 (patch) | |
tree | 384c03b6244cf462c9f35a6d9778db9ce861fbd7 /mdkonline | |
parent | 60d14f15f5d93a4c2a8fb5f6a62b199bb69bc4f6 (diff) | |
download | mgaonline-88a068d6f57529daffe4bca5bfe74685a4e9afd8.tar mgaonline-88a068d6f57529daffe4bca5bfe74685a4e9afd8.tar.gz mgaonline-88a068d6f57529daffe4bca5bfe74685a4e9afd8.tar.bz2 mgaonline-88a068d6f57529daffe4bca5bfe74685a4e9afd8.tar.xz mgaonline-88a068d6f57529daffe4bca5bfe74685a4e9afd8.zip |
if authentication failed with "No host for this id", just
transparently register the host again (eg: when host was deleted
through the web interface)
Diffstat (limited to 'mdkonline')
-rwxr-xr-x | mdkonline | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -167,7 +167,15 @@ my $wiz = data => [ { } ], complete => sub { my $err = send_conf_via_soap($login, $password, $boxname, $descboxname, $country); + # if authentication failed with "No host for this id", just transparently register the host again: + # (eg: when host was deleted through the web interface) if ($err ne 'OK') { + if ($err =~ /No host for this id/) { + log::explanations("registring again the host because the id is lost (deleted through the web interface?"); + substInFile { undef $_ if /HOST_ID|HOST_NAME/ } '/etc/sysconfig/mdkonline'; + $err = send_conf_via_soap($login, $password, $boxname, $descboxname, $country); + } + return $err eq 'OK'; $in->ask_warn(N("Error"), N("Connection problem") . "\n\n" . N("Problem occurs when uploading files, please try again") . "\n\n" . $err); return 1; } |