2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 19:10:10 +00:00

Have imgutil exec manifest / mount

When execing, make the environment see
the '/' normally in mount/df contexts.
This commit is contained in:
Jarrod Johnson 2021-11-11 12:05:53 -05:00
parent 2b6418bc33
commit 524f0d460f

View File

@ -705,6 +705,7 @@ def exec_root_backend(args):
_mount('none', dstresolv, flags=MS_RDONLY|MS_REMOUNT|MS_BIND)
os.chroot(installroot)
os.chdir('/')
_mount('/', '/', flags=MS_BIND) # Make / manifest as a mounted filesystem in exec
os.environ['PS1'] = '[\x1b[1m\x1b[4mIMGUTIL EXEC {0}\x1b[0m \W]$ '.format(imgname)
os.environ['CONFLUENT_IMGUTIL_MODE'] = 'exec'
if args.cmd: