Allow specifying apt_proxy on the commandline.
This commit is contained in:
parent
b0bae98746
commit
accbe9e4e7
@ -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
|
||||
#
|
||||
|
||||
@ -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' },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user