diff --git a/lxc-build b/lxc-build index d9eb5d1..3cfe621 100755 --- a/lxc-build +++ b/lxc-build @@ -81,9 +81,10 @@ def fix_world(): def run_script(): script_filename = os.path.join(LXC_ROOT, layers[-1], 'run.sh') with open(script_filename, 'w') as fd: + fd.write('#!/bin/sh\nset -ev\n') fd.write(' && '.join([s for s in script])) os.chmod(script_filename, 0o700) - subprocess.run(['lxc-execute', '-n', image, '--', '/bin/sh', '-lvc', '/run.sh'], check=True) + subprocess.run(['lxc-execute', '-n', image, '--', '/bin/sh', '-lc', '/run.sh'], check=True) os.unlink(script_filename) def copy_files(src, dst):