[PATCH configure] Do not set httpd_can_network_connect if already set

John Eckersberg jeckersb at redhat.com
Mon Jul 23 17:41:24 UTC 2012


On my F17 system, this reduces configure run time from 140 seconds to
45 seconds.
---
 recipes/apache/manifests/init.pp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/recipes/apache/manifests/init.pp b/recipes/apache/manifests/init.pp
index 91f12a4..2ecec3e 100644
--- a/recipes/apache/manifests/init.pp
+++ b/recipes/apache/manifests/init.pp
@@ -28,7 +28,8 @@ class apache {
   exec{'permit-http-networking':
          command => '/usr/sbin/setsebool -P httpd_can_network_connect 1',
          logoutput => true,
-         unless   => "/usr/bin/test 'Disabled' = `/usr/sbin/getenforce`"
+         unless   => "/usr/bin/test 'Disabled' = `/usr/sbin/getenforce` ||
+                      (/usr/sbin/getsebool httpd_can_network_connect | grep -q 'on$')"
   }
 
 	service { "httpd":
-- 
1.7.10.4




More information about the aeolus-devel mailing list