more vars
This commit is contained in:
parent
43c8962b0f
commit
d0e3be5ce6
@ -90,7 +90,7 @@ class LXCImage:
|
|||||||
|
|
||||||
def rebuild_config(self):
|
def rebuild_config(self):
|
||||||
if len(self.layers) == 1:
|
if len(self.layers) == 1:
|
||||||
rootfs_path = layers[0]
|
rootfs_path = self.layers[0]
|
||||||
else:
|
else:
|
||||||
# Multiple lower overlayfs layers are ordered from right to left (lower2:lower1:rootfs:upper)
|
# Multiple lower overlayfs layers are ordered from right to left (lower2:lower1:rootfs:upper)
|
||||||
rootfs_path = 'overlay:{}:{}'.format(':'.join(self.layers[:-1][::-1], self.layers[-1]))
|
rootfs_path = 'overlay:{}:{}'.format(':'.join(self.layers[:-1][::-1], self.layers[-1]))
|
||||||
@ -109,7 +109,6 @@ class LXCImage:
|
|||||||
def set_name(self, name):
|
def set_name(self, name):
|
||||||
self.name = name
|
self.name = name
|
||||||
os.makedirs(os.path.join(LXC_ROOT, self.name), 0o755, True)
|
os.makedirs(os.path.join(LXC_ROOT, self.name), 0o755, True)
|
||||||
self.rebuild_config()
|
|
||||||
|
|
||||||
def add_layer(self, layer):
|
def add_layer(self, layer):
|
||||||
layer = os.path.join(LXC_ROOT, layer)
|
layer = os.path.join(LXC_ROOT, layer)
|
||||||
@ -119,7 +118,7 @@ class LXCImage:
|
|||||||
|
|
||||||
def copy_files(self, src, dst):
|
def copy_files(self, src, dst):
|
||||||
src = os.path.join(build_dir, src)
|
src = os.path.join(build_dir, src)
|
||||||
dst = os.path.join(layers[-1], dst)
|
dst = os.path.join(self.layers[-1], dst)
|
||||||
copy_tree(src, dst)
|
copy_tree(src, dst)
|
||||||
|
|
||||||
def add_mount(self, src, dst):
|
def add_mount(self, src, dst):
|
||||||
|
Loading…
Reference in New Issue
Block a user