mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
change TIMEZONE on SUSE systems (bsc#1008933)
This commit is contained in:
parent
fdd13b4145
commit
3530b542f0
1 changed files with 2 additions and 2 deletions
|
@ -221,7 +221,7 @@ def set_zone(timezone):
|
|||
'/etc/sysconfig/clock', '^ZONE=.*', 'ZONE="{0}"'.format(timezone))
|
||||
elif 'Suse' in __grains__['os_family']:
|
||||
__salt__['file.sed'](
|
||||
'/etc/sysconfig/clock', '^ZONE=.*', 'ZONE="{0}"'.format(timezone))
|
||||
'/etc/sysconfig/clock', '^TIMEZONE=.*', 'TIMEZONE="{0}"'.format(timezone))
|
||||
elif 'Debian' in __grains__['os_family']:
|
||||
with salt.utils.fopen('/etc/timezone', 'w') as ofh:
|
||||
ofh.write(timezone.strip())
|
||||
|
@ -415,7 +415,7 @@ def set_hwclock(clock):
|
|||
'/etc/sysconfig/clock', '^ZONE=.*', 'ZONE="{0}"'.format(timezone))
|
||||
elif 'Suse' in __grains__['os_family']:
|
||||
__salt__['file.sed'](
|
||||
'/etc/sysconfig/clock', '^ZONE=.*', 'ZONE="{0}"'.format(timezone))
|
||||
'/etc/sysconfig/clock', '^TIMEZONE=.*', 'TIMEZONE="{0}"'.format(timezone))
|
||||
elif 'Debian' in __grains__['os_family']:
|
||||
if clock == 'UTC':
|
||||
__salt__['file.sed']('/etc/default/rcS', '^UTC=.*', 'UTC=yes')
|
||||
|
|
Loading…
Add table
Reference in a new issue