From d21b09d547d1df239ed7e256ea2a575ef8a355dd Mon Sep 17 00:00:00 2001 From: Disassembler Date: Wed, 5 Sep 2018 19:26:15 +0200 Subject: [PATCH] minor fixes --- lxc-build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lxc-build b/lxc-build index 1a6de5f..9bc2c52 100755 --- a/lxc-build +++ b/lxc-build @@ -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':