mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +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
717dd8e549
commit
e2f11a0d2b
@ -340,6 +340,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…
Reference in New Issue
Block a user