mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +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
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue