From e8ec0ebb820110a24e64bd161b9fde233251435f Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Fri, 6 Nov 2015 14:02:56 +0000 Subject: add a dry-run for sanity checking the option combinations --- bin/vmdebootstrap | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/vmdebootstrap b/bin/vmdebootstrap index 0176e0d..9754451 100755 --- a/bin/vmdebootstrap +++ b/bin/vmdebootstrap @@ -186,6 +186,9 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth self.settings.boolean( ['no-acpid'], 'do not install the acpid package', default=False) + self.settings.boolean( + ['dry-run'], 'do not build, just test the options', + default=False) def process_args(self, args): # pylint: disable=too-many-branches,too-many-statements @@ -215,7 +218,8 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth if os.geteuid() != 0: sys.exit("You need to have root privileges to run this script.") - self.start_ops() + if not self.settings['dry-run']: + self.start_ops() def _image_preparations(self): uefi = self.handlers[Uefi.name] -- cgit v1.2.1