2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-14 19:57:50 +00:00

Finalize a captured image

This commit is contained in:
Jarrod Johnson 2021-07-21 11:56:15 -04:00
parent f4281e115b
commit fa45ea8ad3

View File

@ -170,8 +170,12 @@ def capture_remote(opts, args):
if os.path.exists('{}/profiles/default'.format(confdir)):
copy_tree('{}/profiles/default'.format(confdir), outdir)
label = '{0} {1} ({2})'.format(finfo['name'], finfo['version'], profname)
with open(os.path.join(outdir, 'profile.yaml'), 'w') as profileout:
profileout.write('label: {}\n'.format(label))
profileout.write('kernelargs: quiet installtodisk # remove installtodisk to boot stateless')
subprocess.check_call(['chmod', 'o+r,go-w', '-R', outdir])
subprocess.check_call(['chown', '-R', 'confluent', outdir])
subprocess.check_call(['osdeploy', 'updateboot', profname])
def capture_system():