From b3fee922f95ce394f27aff86b368809ea40b8790 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 21 Jul 2021 13:26:31 -0400 Subject: [PATCH] Try to speed up selinux labelling There's only a couple of places where the imaging should need fixup, be more selective in relabel. --- .../el8-diskless/profiles/default/scripts/image2disk.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/confluent_osdeploy/el8-diskless/profiles/default/scripts/image2disk.py b/confluent_osdeploy/el8-diskless/profiles/default/scripts/image2disk.py index 007d1f47..85da6f1a 100644 --- a/confluent_osdeploy/el8-diskless/profiles/default/scripts/image2disk.py +++ b/confluent_osdeploy/el8-diskless/profiles/default/scripts/image2disk.py @@ -117,7 +117,8 @@ def fixup(rootdir, vols): if policy: sys.stdout.write('Applying SELinux labeling...') sys.stdout.flush() - subprocess.check_call(['setfiles', '-r', rootdir, os.path.join(rootdir, 'etc/selinux/{}/contexts/files/file_contexts'.format(policy)), rootdir]) + subprocess.check_call(['setfiles', '-r', rootdir, os.path.join(rootdir, 'etc/selinux/{}/contexts/files/file_contexts'.format(policy)), os.path.join(rootdir, 'etc')]) + subprocess.check_call(['setfiles', '-r', rootdir, os.path.join(rootdir, 'etc/selinux/{}/contexts/files/file_contexts'.format(policy)), os.path.join(rootdir, 'opt')]) sys.stdout.write('Done\n') sys.stdout.flush() for metafs in ('proc', 'sys', 'dev'):