minor fixes

This commit is contained in:
Disassembler 2018-09-05 19:26:15 +02:00
parent 1608b7a93f
commit d21b09d547
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499

View File

@ -13,7 +13,7 @@ lxc.uts.name = {image}
lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.net.0.ipv4.address = 172.17.0.2/16
lxc.net.0.ipv4.address = 172.17.0.254/16
lxc.net.0.ipv4.gateway = auto
# Volumes
@ -42,7 +42,7 @@ layers = []
mounts = []
uid = 0
gid = 0
cmd = '/bin/sh'
cmd = '/bin/true'
script = []
in_script = False
@ -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', '-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):
@ -92,7 +92,7 @@ def copy_files(src, dst):
shutil.copytree(src, dst)
with open(lxcfile, 'r') as fd:
recipe = fd.readlines()
recipe = fd.read().splitlines()
for line in recipe:
if line == 'RUN':