[Kimchi-devel] [PATCH 2/2] Change getsebool to run silently.
Daniel Henrique Barboza
dhbarboza82 at gmail.com
Fri Jul 24 19:22:55 UTC 2015
Patch applied to master branch of https://github.com/danielhb/kimchi
Thanks!
On 07/23/2015 10:57 AM, Ramon Medeiros wrote:
> Reviewed-By: Ramon Medeiros <ramonn at br.ibm.com>
>
> On 07/23/2015 10:56 AM, Jose Ricardo Ziviani wrote:
>> - 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'])
>
More information about the Kimchi-devel
mailing list