From dd955c5e59a69c583712fd3e7f746d1afcd9336d Mon Sep 17 00:00:00 2001 From: Disassembler Date: Wed, 5 Sep 2018 19:34:21 +0200 Subject: [PATCH] set -ev --- lxc-build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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):