As SELinux is turned off only temporarily with
'setenforce 0', the next time the autotest server is
rebooted, the SELinux related problems will start to
pop out again, so change default enforcing mode to
permissive.

Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
---
 contrib/install-autotest-server.sh |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/contrib/install-autotest-server.sh 
b/contrib/install-autotest-server.sh
index ec0f5d9..c1c466c 100755
--- a/contrib/install-autotest-server.sh
+++ b/contrib/install-autotest-server.sh
@@ -203,11 +203,17 @@ setup_selinux() {
 # is in fact an SELinux problem. I did try to fix it, but couldn't, this needs 
to
 # be investigated more carefully.
 print_log "INFO" "Disabling SELinux (sorry guys...)"
-if [ -x /selinux/enforce ]
+if [ -f /selinux/enforce ]
 then
     echo 0 > /selinux/enforce
 fi
+
 setenforce 0
+
+if [ -f /etc/selinux/config ]
+then
+    /usr/local/bin/substitute 'SELINUX=enforcing' 'SELINUX=permissive' 
/etc/selinux/config
+fi
 }
 
 setup_mysql_service() {
-- 
1.7.10.1

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to