2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 17:43:14 +00:00

Fix permissions on generated profile.

This commit is contained in:
Jarrod Johnson 2021-07-21 11:53:51 -04:00
parent 5dfbeef79c
commit f4281e115b

View File

@ -137,6 +137,7 @@ def build_boot_tree(targpath):
def capture_remote(opts, args):
targ = args[0]
outdir = args[1]
os.umask(0o022)
if '/' not in outdir:
outdir = os.path.join('/var/lib/confluent/public/os/', outdir)
# need kernel, initramfs, shim, grub
@ -169,12 +170,8 @@ 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)
subprocess.check_call(['chmod', 'o+r,go-w', '-R', outdir])
subprocess.check_call(['chown', '-R', 'confluent', outdir])
def capture_system():
@ -771,7 +768,5 @@ def gather_bootloader(outdir, rootpath='/'):
shutil.copyfile(grubbin, os.path.join(outdir, 'boot/efi/boot/grub.efi'))
if __name__ == '__main__':
main()