diff --git a/scullery.py b/scullery.py index c656f26..e1d569d 100755 --- a/scullery.py +++ b/scullery.py @@ -40,6 +40,14 @@ vmprefix = 'scullery' cwd = os.getcwd() sshfile='{}/.scullery_ssh'.format(cwd) envfile='{}/.scullery_env'.format(cwd) +vagfile='Vagrantfile-Template' + +# replaced in scullery.spec +is_packaged = False +if is_packaged: + vagfile='/usr/share/scullery/{}'.format(vagfile) +else: + vagfile='{}/{}'.format(os.path.abspath(os.path.dirname(__file__)), vagfile) def _abort(msg): log.error(msg) @@ -163,7 +171,7 @@ def main_interactive(): _abort('Suite referencs an undefined box') box_name = boxconf.get('name', None) box_image = boxconf.get('image', None) - box_file = boxconf.get('file', '{}/Vagrantfile-Template'.format(os.path.abspath(os.path.dirname(__file__)))) + box_file = boxconf.get('file', vagfile) if None in [box_name, box_image, box_file]: _abort('Box configuration is incomplete') box_bootstrap = boxconf.get('bootstrap', None)