diff --git a/lxc-build b/lxc-build index 9bc2c52..d9eb5d1 100755 --- a/lxc-build +++ b/lxc-build @@ -83,7 +83,7 @@ def run_script(): with open(script_filename, 'w') as fd: fd.write(' && '.join([s for s in script])) os.chmod(script_filename, 0o700) - subprocess.run(['lxc-execute', '-n', image, '--', '/bin/sh', '-lc', '/run.sh'], check=True) + subprocess.run(['lxc-execute', '-n', image, '--', '/bin/sh', '-lvc', '/run.sh'], check=True) os.unlink(script_filename) def copy_files(src, dst): @@ -98,8 +98,8 @@ for line in recipe: if line == 'RUN': in_script = False run_script() - elif in_script and not line and not line.startswith('#'): - script.append() + elif in_script and line and not line.startswith('#'): + script.append(line) elif line == 'SCRIPT': script = [] in_script = True