Commit 4b59ea39 authored by Dietmar Maurer's avatar Dietmar Maurer

use /etc/subscription to store subscription key

parent cdf13992
......@@ -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;
......
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 <support@proxmox.com> 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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment