[PATCH] Suppress selinux error log when using default (#1083239)

Brian C. Lane bcl at redhat.com
Wed Apr 2 17:20:04 UTC 2014


When there is no kickstart or no selinux command it will default to
None, meaning use whatever mode was set by the installed packages. There
is no need to log this as an error.

Resolves: rhbz#1083239
---
 pyanaconda/kickstart.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 91659a3..b0c104f 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -1367,7 +1367,10 @@ class SELinux(commands.selinux.FC3_SELinux):
                            SELINUX_ENFORCING: "enforcing",
                            SELINUX_PERMISSIVE: "permissive" }
 
-        if self.selinux not in selinux_states:
+        if self.selinux is None:
+            # Use the defaults set by the installed (or not) selinux package
+            return
+        elif self.selinux not in selinux_states:
             log.error("unknown selinux state: %s", self.selinux)
             return
 
-- 
1.9.0



More information about the anaconda-patches mailing list