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
39d729a6
Commit
39d729a6
authored
Jul 26, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tell apt to use http_proxy settings
parent
d47f3a7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
APT.pm
PVE/API2/APT.pm
+10
-0
No files found.
PVE/API2/APT.pm
View file @
39d729a6
...
@@ -249,6 +249,16 @@ __PACKAGE__->register_method({
...
@@ -249,6 +249,16 @@ __PACKAGE__->register_method({
my
$realcmd
=
sub
{
my
$realcmd
=
sub
{
my
$upid
=
shift
;
my
$upid
=
shift
;
# setup proxy for apt
my
$dcconf
=
PVE::Cluster::
cfs_read_file
('
datacenter.cfg
');
my
$aptconf
=
"
// no proxy configured
\n
";
if
(
$dcconf
->
{
http_proxy
})
{
$aptconf
=
"
Acquire::http::Proxy
\"
$dcconf
->{http_proxy}
\"
;
\n
";
}
my
$aptcfn
=
"
/etc/apt/apt.conf.d/76pveproxy
";
PVE::Tools::
file_set_contents
(
$aptcfn
,
$aptconf
);
my
$cmd
=
['
apt-get
',
'
update
'];
my
$cmd
=
['
apt-get
',
'
update
'];
print
"
starting apt-get update
\n
";
print
"
starting apt-get update
\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