guess what? more vars
This commit is contained in:
parent
d0e3be5ce6
commit
fd07ec7cb8
@ -93,7 +93,7 @@ class LXCImage:
|
||||
rootfs_path = self.layers[0]
|
||||
else:
|
||||
# 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])
|
||||
mount_entries = '\n'.join(['lxc.mount.entry = {} none bind 0 0'.format(m) for m in self.mounts])
|
||||
with open(os.path.join(LXC_ROOT, self.name, 'config'), 'w') as fd:
|
||||
fd.write(CONFIG_TEMPLATE.format(name=self.name, rootfs=rootfs_path, mounts=mount_entries, uid=self.uid, gid=self.gid, cmd=self.cmd))
|
||||
@ -122,7 +122,7 @@ class LXCImage:
|
||||
copy_tree(src, dst)
|
||||
|
||||
def add_mount(self, src, dst):
|
||||
mounts.append('{} {}'.format(src, dst))
|
||||
self.mounts.append('{} {}'.format(src, dst))
|
||||
self.rebuild_config()
|
||||
|
||||
def set_user(self, uid, gid):
|
||||
|
Loading…
Reference in New Issue
Block a user