diff --git a/bootstrapvz/base/bootstrapinfo.py b/bootstrapvz/base/bootstrapinfo.py index 30a54f3..e2cb6e9 100644 --- a/bootstrapvz/base/bootstrapinfo.py +++ b/bootstrapvz/base/bootstrapinfo.py @@ -55,6 +55,10 @@ class BootstrapInformation(object): # that hint at how a command may be made available. self.host_dependencies = {} + # Path to optional bootstrapping script for modifying the behaviour of debootstrap + # (will be used instead of e.g. /usr/share/debootstrap/scripts/jessie) + self.bootstrap_script = None + # Lists of startup scripts that should be installed and disabled self.initd = {'install': {}, 'disable': []} diff --git a/bootstrapvz/common/tasks/bootstrap.py b/bootstrapvz/common/tasks/bootstrap.py index 9f8f1f6..75d882b 100644 --- a/bootstrapvz/common/tasks/bootstrap.py +++ b/bootstrapvz/common/tasks/bootstrap.py @@ -75,6 +75,10 @@ class Bootstrap(Task): log.debug('Found matching tarball, skipping download') options.extend(['--unpack-tarball=' + tarball]) + if info.bootstrap_script is not None: + # Optional bootstrapping script to modify the bootstrapping process + arguments.append(info.bootstrap_script) + from ..tools import log_check_call log_check_call(executable + options + arguments)