minor fixes
This commit is contained in:
parent
d21b09d547
commit
260c8159c7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user