Add option --debootstrap-cmd to xen-create-image and xt-install-image
This commit is contained in:
@@ -39,7 +39,8 @@ xen-create-image - Easily create new Xen instances with networking and OpenSSH.
|
||||
--copy-cmd NOP: Ignored.
|
||||
|
||||
--debootstrap-cmd
|
||||
NOP: Ignored.
|
||||
Specify which debootstrap command is used, either
|
||||
debootstrap (default) or cdebootstrap.
|
||||
|
||||
--force Force overwriting existing images. This will remove
|
||||
existing images or LVM volumes which match those which
|
||||
@@ -1272,9 +1273,11 @@ sub setupDefaultOptions
|
||||
$CONFIG{ 'extension' } = '.cfg';
|
||||
|
||||
#
|
||||
# Installation method defaults to "debootstrap".
|
||||
# Installation method defaults to "debootstrap" using
|
||||
# "debootstrap" (instead of cdebootstrap).
|
||||
#
|
||||
$CONFIG{ 'install-method' } = 'debootstrap';
|
||||
$CONFIG{ 'debootstrap-cmd' } = '';
|
||||
|
||||
#
|
||||
# The program to run to create a filesystem.
|
||||
@@ -1465,8 +1468,9 @@ sub parseCommandLineArguments
|
||||
#
|
||||
# NOTE: We set the local variable here, not the global.
|
||||
#
|
||||
"install-method=s", \$CONFIG{ 'install-method' },
|
||||
"install-source=s", \$CONFIG{ 'install-source' },
|
||||
"install-method=s", \$CONFIG{ 'install-method' },
|
||||
"install-source=s", \$CONFIG{ 'install-source' },
|
||||
"debootstrap-cmd=s", \$CONFIG{ 'debootstrap-cmd' },
|
||||
|
||||
# Misc. options
|
||||
"accounts", \$CONFIG{ 'accounts' },
|
||||
@@ -3229,6 +3233,16 @@ sub installSystem
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Propagate --debootstrap-cmd if install-method is debootstrap
|
||||
#
|
||||
if ( $CONFIG{ 'install-method' } eq 'debootstrap' and
|
||||
$CONFIG{ 'debootstrap-cmd' } )
|
||||
{
|
||||
$cmd .= " --debootstrap-cmd=$CONFIG{'debootstrap-cmd'}";
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Show the user what they are installing
|
||||
#
|
||||
|
||||
@@ -29,8 +29,9 @@ xt-install-image - Install a fresh copy of GNU/Linux into a directory
|
||||
--mirror The mirror to use when installing with 'debootstrap'.
|
||||
|
||||
Installation Options:
|
||||
--install-method Specify the installation method to use.
|
||||
--install-source Specify the installation source to use.
|
||||
--install-method Specify the installation method to use.
|
||||
--install-source Specify the installation source to use.
|
||||
--debootstrap-cmd Specify which debootstrap command to use.
|
||||
|
||||
All other options from xen-create-image will be passed as environmental
|
||||
variables.
|
||||
@@ -401,6 +402,7 @@ sub parseCommandLineArguments
|
||||
# Installation method
|
||||
"install-method=s", \$CONFIG{ 'install-method' },
|
||||
"install-source=s", \$CONFIG{ 'install-source' },
|
||||
"debootstrap-cmd=s", \$CONFIG{ 'debootstrap-cmd' },
|
||||
|
||||
# Misc
|
||||
"arch=s", \$CONFIG{ 'arch' },
|
||||
@@ -686,7 +688,7 @@ sub do_debootstrap
|
||||
# to use cdebootstrap.
|
||||
#
|
||||
my $cmd = $CONFIG{ 'debootstrap-cmd' };
|
||||
if ( !defined($cmd) )
|
||||
if ( !$cmd )
|
||||
{
|
||||
print "Falling back to default debootstrap command\n";
|
||||
$cmd = '/usr/sbin/debootstrap';
|
||||
|
||||
5
debian/changelog
vendored
5
debian/changelog
vendored
@@ -34,6 +34,11 @@ xen-tools (4.2~rc1-1) UNRELEASED; urgency=low
|
||||
- xt-install-image now exits with return value 127 instead of 0 to
|
||||
indicate errors on running the command given in --install-method.
|
||||
(Closes: #534290)
|
||||
- The debootstrap command now also can be configured on the
|
||||
commandline with --debootstrap-cmd in xen-create-image and
|
||||
xt-install-image (Enhances fix for #436480 which added the
|
||||
debootstrap-cmd config file option; Changed "Depends: debootstrap"
|
||||
to "Depends: debootstrap | cdebootstrap" in debian/control)
|
||||
* Removal of /etc/bash_completion.d/xm from the package since
|
||||
bash-completion ships a more elaborate version of that file. (Closes:
|
||||
#566683, #550590, LP: #538917, #484098)
|
||||
|
||||
2
debian/control
vendored
2
debian/control
vendored
@@ -10,7 +10,7 @@ Vcs-Git: git://gitorious.org/xen-tools/xen-tools.git
|
||||
|
||||
Package: xen-tools
|
||||
Architecture: all
|
||||
Depends: debootstrap, perl-modules, libtext-template-perl, libconfig-inifiles-perl, libfile-slurp-perl, ${misc:Depends}
|
||||
Depends: debootstrap | cdebootstrap, perl-modules, libtext-template-perl, libconfig-inifiles-perl, libfile-slurp-perl, ${misc:Depends}
|
||||
Recommends: xen-hypervisor-amd64 | xen-hypervisor-i386 | xen-hypervisor-i386-pae, rinse, xen-shell, libexpect-perl
|
||||
Suggests: reiserfsprogs, xfsprogs, xen-utils
|
||||
Description: Tools to manage Xen virtual servers
|
||||
|
||||
Reference in New Issue
Block a user