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

Fix ability to copy profiles during pack

This commit is contained in:
Jarrod Johnson 2021-06-15 08:11:31 -04:00
parent 62ac393721
commit 1d8d0699bc

View File

@ -2,6 +2,7 @@
import configparser
import ctypes
import ctypes.util
from distutils.dir_util import copy_tree
import glob
import optparse
import os
@ -373,7 +374,7 @@ def pack_image(opts, args):
os.symlink('{}/initramfs/addons.cpio'.format(confdir),
os.path.join(outdir, 'boot/initramfs/addons.cpio'))
if os.path.exists('{}/profiles/default'.format(confdir)):
shutil.copytree('{}/profiles/default'.format(confdir), outdir)
copy_tree('{}/profiles/default'.format(confdir), outdir)
try:
pwd.getpwnam('confluent')
subprocess.check_call(['chown', '-R', 'confluent', outdir])