Merge pull request #43372 from skizunov/develop5

Fix system.set_system_time when no hw clock is present
This commit is contained in:
Nicole Thomas 2017-09-07 13:45:32 -04:00 committed by GitHub
commit f959113694

View File

@ -168,7 +168,10 @@ def has_settable_hwclock():
salt '*' system.has_settable_hwclock
'''
if salt.utils.which_bin(['hwclock']) is not None:
res = __salt__['cmd.run_all'](['hwclock', '--test', '--systohc'], python_shell=False)
res = __salt__['cmd.run_all'](
['hwclock', '--test', '--systohc'], python_shell=False,
output_loglevel='quiet', ignore_retcode=True
)
return res['retcode'] == 0
return False