mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +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
|
salt '*' system.has_settable_hwclock
|
||||||
'''
|
'''
|
||||||
if salt.utils.which_bin(['hwclock']) is not None:
|
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 res['retcode'] == 0
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user