[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Ovirt-devel] [PATCH node-image] set SELinux enforcing temporary to permissive



otherwise SELinux modules do not get loaded in livecd install chroot

Signed-off-by: Alan Pevec <apevec redhat com>
---
 ovirt-node-image.spec.in |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ovirt-node-image.spec.in b/ovirt-node-image.spec.in
index 58b6e46..33fd78d 100644
--- a/ovirt-node-image.spec.in
+++ b/ovirt-node-image.spec.in
@@ -58,8 +58,17 @@ EOF
 mkdir -p %{ovirt_cache_dir}/node-image-tmp
 mkdir -p %{ovirt_cache_dir}/yum
 
-sudo su - -c "cd $(pwd) && livecd-creator --skip-minimize -c %{name}.ks -f %{name} \
-               --tmpdir='%{ovirt_cache_dir}/node-image-tmp' --cache='%{ovirt_cache_dir}/yum'"
+sudo su - -c "cd $(pwd) &&
+              if [ $(cat /selinux/enforce) = 1 ]; then
+                enforcing=1
+                setenforce 0
+              else
+                enforcing=0
+              fi
+              livecd-creator --skip-minimize -c %{name}.ks -f %{name} \
+               --tmpdir='%{ovirt_cache_dir}/node-image-tmp' \
+               --cache='%{ovirt_cache_dir}/yum'
+              setenforce \$enforcing"
 sudo su - -c "cd $(pwd) && ./ovirt-pxe %{name}.iso"
 sudo su - -c "cd $(pwd) && chown -R $USER ."
 
-- 
1.5.5.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]