[Kimchi-devel] [PATCH 2/2] Change getsebool to run silently.

Jose Ricardo Ziviani joserz at linux.vnet.ibm.com
Thu Jul 23 13:56:11 UTC 2015


 - getsebool virt_use_sysfs exists in RHEL6 and older distributions
   only. Newer distros don't have it but run_command alerts there is an
   error in Kimchi. This is not an error but a expected behavior. For
   this reason, this command now will only log for debugging purposes.

Signed-off-by: Jose Ricardo Ziviani <joserz at linux.vnet.ibm.com>
---
 src/kimchi/model/vmhostdevs.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/kimchi/model/vmhostdevs.py b/src/kimchi/model/vmhostdevs.py
index 3e711cb..9a7d03b 100644
--- a/src/kimchi/model/vmhostdevs.py
+++ b/src/kimchi/model/vmhostdevs.py
@@ -102,7 +102,8 @@ class VMHostDevsModel(object):
 
         # Enable virt_use_sysfs on RHEL6 and older distributions
         # In recent Fedora, there is no virt_use_sysfs.
-        out, err, rc = run_command(['getsebool', 'virt_use_sysfs'])
+        out, err, rc = run_command(['getsebool', 'virt_use_sysfs'],
+                                   silent=True)
         if rc == 0 and out.rstrip('\n') != "virt_use_sysfs --> on":
             out, err, rc = run_command(['setsebool', '-P',
                                         'virt_use_sysfs=on'])
-- 
1.9.1




More information about the Kimchi-devel mailing list