Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
97c0efae
Commit
97c0efae
authored
Feb 13, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pveceph: use LWP instead of wget
Avoid bug in wget certificate verification on Debian wheezy.
parent
3221f385
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
pveceph
bin/pveceph
+20
-1
No files found.
bin/pveceph
View file @
97c0efae
...
...
@@ -8,6 +8,7 @@ use File::Path;
use
IO::
File
;
use
JSON
;
use
Data::
Dumper
;
use
LWP::
UserAgent
;
use
PVE::
SafeSyslog
;
use
PVE::
Cluster
;
...
...
@@ -102,9 +103,27 @@ __PACKAGE__->register_method ({
my
$keyurl
=
"
https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
";
print
"
download and import ceph reqpository keys
\n
";
system
("
wget -q -O- '
$keyurl
'| apt-key add - 2>&1 >/dev/null
")
==
0
||
# Note: wget on Debian wheezy cannot handle new ceph.com certificates, so
# we use LWP::UserAgent
#system("wget -q -O- '$keyurl'| apt-key add - 2>&1 >/dev/null") == 0 ||
#die "unable to download ceph release key\n";
my
$tmp_key_file
=
"
/tmp/ceph-release-keys.asc
";
my
$ua
=
LWP::
UserAgent
->
new
(
protocols_allowed
=>
['
https
'],
timeout
=>
30
);
$ua
->
env_proxy
;
my
$response
=
$ua
->
get
(
$keyurl
);
if
(
$response
->
is_success
)
{
my
$data
=
$response
->
decoded_content
;
PVE::Tools::
file_set_contents
(
$tmp_key_file
,
$data
);
}
else
{
die
"
unable to download ceph release key:
"
.
$response
->
status_line
.
"
\n
";
}
system
("
apt-key add
$tmp_key_file
2>&1 >/dev/null
")
==
0
||
die
"
unable to download ceph release key
\n
";
unlink
$tmp_key_file
;
my
$source
=
"
deb http://ceph.com/debian-
$cephver
wheezy main
\n
";
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment