diff --git a/PVE/API2/Subscription.pm b/PVE/API2/Subscription.pm index 9701c6f0..2a8b4a93 100644 --- a/PVE/API2/Subscription.pm +++ b/PVE/API2/Subscription.pm @@ -24,7 +24,7 @@ use PVE::RESTHandler; use base qw(PVE::RESTHandler); -PVE::INotify::register_file('subscription', "/etc/pve-subscription", +PVE::INotify::register_file('subscription', "/etc/subscription", \&read_etc_pve_subscription, \&write_etc_pve_subscription); @@ -191,6 +191,9 @@ sub check_subscription { my $check_token = time() . md5_hex(rand(8999999999) + 1000000000) . $key; + my $dccfg = PVE::Cluster::cfs_read_file('datacenter.cfg'); + my $proxy = $dccfg->{http_proxy}; + my $params = { licensekey => $key, dir => $server_id, @@ -209,7 +212,14 @@ sub check_subscription { $req->header('Content-Length' => length($content)); $req->content($content); - my $ua = LWP::UserAgent->new(protocols_allowed => [ 'http', 'https' ], timeout => 30); + my $ua = LWP::UserAgent->new(protocols_allowed => ['http'], timeout => 30); + + if ($proxy) { + $ua->proxy(['http'], $proxy); + } else { + $ua->env_proxy; + } + my $response = $ua->request($req); my $code = $response->code; diff --git a/debian/changelog.Debian b/debian/changelog.Debian index 120f95a8..58fd6ae2 100644 --- a/debian/changelog.Debian +++ b/debian/changelog.Debian @@ -1,3 +1,11 @@ +pve-manager (2.0-54) unstable; urgency=low + + * use /etc/subscription to store subscription key + + * use http_proxy settings for subscription updates + + -- Proxmox Support Team Thu, 29 Mar 2012 11:13:35 +0200 + pve-manager (2.0-53) unstable; urgency=low * fix bug #117: automatically add domain to hostname when creating diff --git a/defines.mk b/defines.mk index 49d1c1db..cc725dfa 100644 --- a/defines.mk +++ b/defines.mk @@ -2,7 +2,7 @@ RELEASE=2.0 VERSION=2.0 PACKAGE=pve-manager -PACKAGERELEASE=53 +PACKAGERELEASE=54 BINDIR=${DESTDIR}/usr/bin PERLLIBDIR=${DESTDIR}/usr/share/perl5