diff --git a/build_c6_live.sh b/build_c6_live.sh index b27376c..5100c4e 100755 --- a/build_c6_live.sh +++ b/build_c6_live.sh @@ -76,9 +76,20 @@ do done cd `dirname $0` -setenforce 0 + +# checking selinux state on the machine, needed to go to Permissive for the livecd-tool to work +isSelinuxOn=`/usr/sbin/getenforce` +if [ "$isSelinuxOn" = "Enforcing" ] ;then + /usr/sbin/setenforce 0 +fi + /bin/cp ks/centos6-live${media}-desktop.cfg /tmp/ sed -i s#REPOPATH#$repopath#g /tmp/centos6-live${media}-desktop.cfg setarch $arch livecd-creator -c /tmp/centos6-live${media}-desktop.cfg -f "CentOS-6-${arch}-Live${media}" -setenforce 1 + +if [ "$isSelinuxOn" = "Enforcing" ] ;then + /usr/sbin/setenforce 1 +fi + +