mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 19:32:31 +00:00 
			
		
		
		
	probe_utils: simplify selinux enforcing check
This commit is contained in:
		| @@ -256,11 +256,8 @@ sub is_selinux_enforcing { | ||||
|     if (-e "/usr/sbin/getenforce") { | ||||
|         my $enforce_mode = `/usr/sbin/getenforce`; | ||||
|         chomp $enforce_mode; | ||||
|         for ($enforce_mode) { | ||||
|           if    (/Disabled/)   { $retval = 0; } | ||||
|           elsif (/Permissive/) { $retval = 0; } | ||||
|           elsif (/Enforcing/)  { $retval = 1; } | ||||
|           else { $retval = 0; } | ||||
| 	if ($enforce_mode eq "Enforcing") { | ||||
|             $retval = 1; | ||||
|         } | ||||
|     } | ||||
|     return $retval; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user