diff options
author | Neil Williams <codehelp@debian.org> | 2015-11-06 14:02:56 +0000 |
---|---|---|
committer | Neil Williams <codehelp@debian.org> | 2015-11-06 14:02:56 +0000 |
commit | e8ec0ebb820110a24e64bd161b9fde233251435f (patch) | |
tree | b79fbe24f8b62127ecc3b069a825febf44d8ddac /bin | |
parent | e4e6de36f02c5874daebba1dd682454da20e1cd9 (diff) | |
download | vmdebootstrap-e8ec0ebb820110a24e64bd161b9fde233251435f.tar.gz |
add a dry-run for sanity checking the option combinations
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/vmdebootstrap | 6 |
1 files changed, 5 insertions, 1 deletions
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] |