mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add handling for FreeBSD in method zone_compare to avoid exception when /etc/localtime file does is absent. This is valid configuration on FreeBSD and represents UTC.
This commit is contained in:
parent
f2f6817e86
commit
d6e28ebed1
1 changed files with 4 additions and 0 deletions
|
@ -337,6 +337,10 @@ def zone_compare(timezone):
|
|||
if 'Solaris' in __grains__['os_family'] or 'AIX' in __grains__['os_family']:
|
||||
return timezone == get_zone()
|
||||
|
||||
if 'FreeBSD' in __grains__['os_family']:
|
||||
if not os.path.isfile(_get_etc_localtime_path()):
|
||||
return timezone == get_zone()
|
||||
|
||||
tzfile = _get_etc_localtime_path()
|
||||
zonepath = _get_zone_file(timezone)
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue