minor fixes

This commit is contained in:
Disassembler 2018-09-05 19:29:56 +02:00
parent d21b09d547
commit 260c8159c7
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499

View File

@ -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