summaryrefslogtreecommitdiffstats
path: root/mdkonline
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-09-21 12:42:48 +0000
committerThierry Vignaud <tv@mandriva.org>2006-09-21 12:42:48 +0000
commit88a068d6f57529daffe4bca5bfe74685a4e9afd8 (patch)
tree384c03b6244cf462c9f35a6d9778db9ce861fbd7 /mdkonline
parent60d14f15f5d93a4c2a8fb5f6a62b199bb69bc4f6 (diff)
downloadmgaonline-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-xmdkonline8
1 files changed, 8 insertions, 0 deletions
diff --git a/mdkonline b/mdkonline
index c8915cf4..f0b1ae3d 100755
--- a/mdkonline
+++ b/mdkonline
@@ -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;
}