mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
/etc/default/rcS file does not contain UTC boolean value on Debian Wheezy, causes out-of-bounds exception when attempting to lookup given value
This commit is contained in:
parent
608d24e308
commit
bdc83fd758
@ -160,7 +160,7 @@ def get_hwclock():
|
||||
elif 'Debian' in __grains__['os_family']:
|
||||
cmd = 'grep "UTC=" /etc/default/rcS | grep -vE "^#"'
|
||||
out = __salt__['cmd.run'](cmd).split('=')
|
||||
if out[1] == 'yes':
|
||||
if len(out) > 1 and out[1] == 'yes':
|
||||
return 'UTC'
|
||||
else:
|
||||
return 'localtime'
|
||||
|
Loading…
Reference in New Issue
Block a user