1
0
mirror of synced 2026-04-15 23:51:03 +00:00

Check for debootstrap and cdebootstrap installation, decide default based on that

This commit is contained in:
Axel Beckert
2010-05-23 23:14:25 +02:00
parent b55d27c290
commit 95a83dc5b9
3 changed files with 19 additions and 7 deletions

View File

@@ -39,8 +39,9 @@ xen-create-image - Easily create new Xen instances with networking and OpenSSH.
--copy-cmd NOP: Ignored.
--debootstrap-cmd
Specify which debootstrap command is used, either
debootstrap (default) or cdebootstrap.
Specify which debootstrap command is used. Defaults to
debootstrap if both, debootstrap and cdebootstrap are
installed.
--force Force overwriting existing images. This will remove
existing images or LVM volumes which match those which

View File

@@ -31,7 +31,9 @@ xt-install-image - Install a fresh copy of GNU/Linux into a directory
Installation Options:
--install-method Specify the installation method to use.
--install-source Specify the installation source to use.
--debootstrap-cmd Specify which debootstrap command to use.
--debootstrap-cmd Specify which debootstrap command to
use. Defaults to debootstrap if both, debootstrap
and cdebootstrap are installed.
All other options from xen-create-image will be passed as environmental
variables.
@@ -690,8 +692,15 @@ sub do_debootstrap
my $cmd = $CONFIG{ 'debootstrap-cmd' };
if ( !$cmd )
{
print "Falling back to default debootstrap command\n";
$cmd = '/usr/sbin/debootstrap';
if (-x '/usr/sbin/debootstrap') {
$cmd = '/usr/sbin/debootstrap';
} elsif (-x '/usr/sbin/cdebootstrap') {
$cmd = '/usr/sbin/cdebootstrap';
} else {
print STDERR "Found neither debootstrap nor cdebootstrap and no --debootstrap-cmd given\n";
exit 1;
}
print "Using $cmd as debootstrap command\n";
}

6
debian/changelog vendored
View File

@@ -37,8 +37,10 @@ xen-tools (4.2~rc1-1) UNRELEASED; urgency=low
- 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)
debootstrap-cmd config file option)
- Checks for debootstrap and cdebootstrap, uses debootstrap if both
are installed (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)