2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-29 04:50:21 +00:00

Fix imgutil volume mounting

This commit is contained in:
Jarrod Johnson 2021-06-15 12:12:27 -04:00
parent 802ba9c708
commit 55a4211e71

View File

@ -237,10 +237,14 @@ def _mount_constrained_fs(opts, installroot):
for v in opts.volume:
if ':' in v:
src, dst = v.split(':')
while dst and dst[0] == '/':
dst = dst[1:]
dst = os.path.join(installroot, dst)
else:
src = v
dst = os.path.join(installroot, 'run/external')
while v and v[0] = '/':
v = v[1:]
dst = os.path.join(dst, v)
mkdirp(dst)
_mount(src, dst, flags=MS_BIND|MS_RDONLY)