summaryrefslogtreecommitdiffstats
path: root/mdkupdate
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2006-02-15 16:07:06 +0000
committerDaouda Lo <daouda@mandriva.com>2006-02-15 16:07:06 +0000
commit5cedd60005433a0a64a738f407d92a76f3ce176e (patch)
treeef99add0c4c4354bac80a987c1cbef8a1c62034b /mdkupdate
parente7c430788d49e4c2c37465ca46b9d20dbeca328d (diff)
downloadmgaonline-5cedd60005433a0a64a738f407d92a76f3ce176e.tar
mgaonline-5cedd60005433a0a64a738f407d92a76f3ce176e.tar.gz
mgaonline-5cedd60005433a0a64a738f407d92a76f3ce176e.tar.bz2
mgaonline-5cedd60005433a0a64a738f407d92a76f3ce176e.tar.xz
mgaonline-5cedd60005433a0a64a738f407d92a76f3ce176e.zip
- use real machine name
Diffstat (limited to 'mdkupdate')
-rwxr-xr-xmdkupdate12
1 files changed, 5 insertions, 7 deletions
diff --git a/mdkupdate b/mdkupdate
index 244fe6ad..da9a805b 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -32,8 +32,6 @@ use urpm;
use Getopt::Long;
-use SOAP::Lite;
-
BEGIN { unshift @::textdomains, 'mdkupdate' }
require_root_capability();
@@ -167,16 +165,16 @@ if (!$bundle) {
my $namespace = 'http://online3.mandriva.com/o/soap/';
my $serviceProxy = $namespace;
my %bundle_vars = getVarsFromSh($bundle);
+
$o{LOGIN} or system("/usr/sbin/mdkonline");
$o{LOGIN} or die("Configuration not uploaded to Mandriva Online");
+
my $s = SOAP::Lite
->proxy($serviceProxy)
->uri($namespace);
- my $hostname = chomp_(`hostname`);
- $data = $s->authenticateUser( $o{LOGIN}, $o{PASS} )->result();
- $data = $s->registerHost( $o{LOGIN}, $o{PASS}, $hostname, "plop" )->result();
- my $id = $data->{data}->{host_id};
- my $key = $data->{data}->{host_key};
+ $data = mdkonline::soap_authenticate_user($o{LOGIN}, $o{PASS});
+ $data = mdkonline::soap_register_host($o{LOGIN}, $o{PASS}, $o{MACHINE}, "Testing online");
+ my $id = $data->{data}->{host_id}; my $key = $data->{data}->{host_key};
$data = $s->query( $id, $key, 'Software::get_bundle', $bundle_vars{BUNDLE} )->result();
}