mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #43372 from skizunov/develop5
Fix system.set_system_time when no hw clock is present
This commit is contained in:
commit
f959113694
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user