1
0
mirror of synced 2026-01-16 16:17:54 +00:00

Allow specifying apt_proxy on the commandline.

This commit is contained in:
Alex Tomlins 2011-03-31 11:35:14 +01:00
parent b0bae98746
commit accbe9e4e7
2 changed files with 17 additions and 0 deletions

View File

@ -204,6 +204,10 @@ xen-create-image - Easily create new Xen instances with networking and OpenSSH.
to choose a more or less close Debian mirror. See
http://wiki.debian.org/DebianGeoMirror for details.
--apt_proxy=url
Specify a proxy to be used by debootstrap, and within
the guest.
--template=tmpl
Specify which template file to use when creating the
Xen configuration file.
@ -1364,6 +1368,7 @@ sub setupDefaultOptions
foreach my $ubuntudist (qw(edgy feisty gutsy intrepid)) {
$CONFIG{ 'mirror_'.$ubuntudist } = 'http://old-releases.ubuntu.com/ubuntu';
}
$CONFIG{ 'apt_proxy' } = '';
$CONFIG{ 'arch' } = '';
$CONFIG{ 'fs' } = 'ext3';
$CONFIG{ 'force' } = 0;
@ -1705,6 +1710,7 @@ sub parseCommandLineArguments
"kernel=s", \&checkOption,
"initrd=s", \&checkOption,
"mirror=s", \&checkOption,
"apt_proxy=s", \&checkOption,
"modules=s", \&checkOption,
"lvm=s", \$install{ 'lvm' },
"image-dev=s", \$install{ 'image-dev' },
@ -3571,6 +3577,15 @@ sub installSystem
}
#
# Propagate --apt_proxy
#
if ( $CONFIG{ 'apt_proxy' } )
{
$cmd .= " --apt_proxy=$CONFIG{'apt_proxy'}";
}
#
# Show the user what they are installing
#

View File

@ -27,6 +27,7 @@ xt-install-image - Install a fresh copy of GNU/Linux into a directory
--config Read the specified config file in addition to the global
configuration file.
--mirror The mirror to use when installing with 'debootstrap'.
--apt_proxy The proxy to use when installing with 'debootstrap'.
Installation Options:
--install-method Specify the installation method to use.
@ -395,6 +396,7 @@ sub parseCommandLineArguments
"cachedir=s", \$CONFIG{ 'cachedir' },
"config=s", \$CONFIG{ 'config' },
"mirror=s", \$CONFIG{ 'mirror' },
"apt_proxy=s", \$CONFIG{ 'apt_proxy' },
# Help.
"verbose", \$CONFIG{ 'verbose' },