mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-14 09:01:32 +00:00
use /etc/subscription to store subscription key
This commit is contained in:
parent
cd73c63b7d
commit
5f7b79501f
@ -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;
|
||||
|
||||
|
8
debian/changelog.Debian
vendored
8
debian/changelog.Debian
vendored
@ -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 <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
|
||||
|
Loading…
Reference in New Issue
Block a user