summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2015-09-13 11:03:49 +0100
committerNeil Williams <codehelp@debian.org>2015-09-13 12:44:24 +0100
commit1888bb0844dbce4f16262ab3cc913ba013fc0924 (patch)
treecef25622391fdb59f1fb3b4c75de91253343d3c9
parent9aa3b05eb60c6af8678f38ba33ef04f52fb64a36 (diff)
downloadvmdebootstrap-1888bb0844dbce4f16262ab3cc913ba013fc0924.tar.gz
Add support for debootstrapopts
In line with other wrapping tools which pass extra options using the opts suffix, use support in recent cliapp to pass unchanged options down to debootstrap. Deprecate --variant as this is only used by debootstrap and is replaced by debootstrapopts.
-rwxr-xr-xvmdebootstrap10
-rw-r--r--vmdebootstrap.8.in5
2 files changed, 13 insertions, 2 deletions
diff --git a/vmdebootstrap b/vmdebootstrap
index 138d8a6..163ee41 100755
--- a/vmdebootstrap
+++ b/vmdebootstrap
@@ -125,7 +125,10 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth
'set up foreign debootstrap environment using provided program (ie binfmt handler)')
self.settings.string(
['variant'],
- 'select debootstrap variant it not using the default')
+ 'select debootstrap variant if not using the default [deprecated]')
+ self.settings.string_list(
+ ['debootstrapopts'],
+ 'pass additional options to debootstrap'),
self.settings.boolean(
['extlinux'],
'install extlinux?',
@@ -641,7 +644,10 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth
'--include=%s' % ','.join(include))
if self.settings['foreign']:
args.append('--foreign')
- if self.settings['variant']:
+ if self.settings['debootstrapopts']:
+ for opt in self.settings['debootstrapopts']:
+ args.append('--%s' % opt)
+ elif self.settings['variant']:
args.append('--variant')
args.append(self.settings['variant'])
args += [self.settings['distribution'],
diff --git a/vmdebootstrap.8.in b/vmdebootstrap.8.in
index 0364bed..f7a4439 100644
--- a/vmdebootstrap.8.in
+++ b/vmdebootstrap.8.in
@@ -30,6 +30,7 @@ vmdebootstrap \- install basic Debian system into virtual disk image
[\-\-bootsize=BOOTSIZE] [\-\-boottype=FSTYPE] [\-\-roottype=FSTYPE] [\-\-foreign=PATH]
[\-\-variant=VARIANT] [\-\-no-extlinux] [\-\-squash] [\-\-configure-apt]
[\-\-grub] [\-\-apt-mirror] [\-\-pkglist] [\-\-use\-efi] [\-\-efi\-size]
+[\-\-debootstrapopts]
.SH DESCRIPTION
.B vmdebootstrap
installs a basic Debian system into a virtual disk image,
@@ -280,6 +281,10 @@ available.
Disable extlinux installation and configure grub2 instead. grub2 will be added to
the list of packages to install. update-grub will be called once the debootstrap is
complete and grub-install will be called in the image.
+.IP \-\-debootstrapopts
+Pass additional options to debootstrap as a quoted list of options
+and values, separated by commas. See debootstrap \-\-help and
+debootstrap (1) for valid options.
.IP \-\-no\-acpid
Disable installation of acpid if not required, otherwise acpid will be
installed if \-\-foreign is not used.