From e16da094d16e62a821af641b8f29b561d9cf51f5 Mon Sep 17 00:00:00 2001 From: Justin Findlay Date: Mon, 17 Nov 2014 16:56:44 -0700 Subject: [PATCH] update timezone.py shell cmds --- salt/modules/timezone.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/salt/modules/timezone.py b/salt/modules/timezone.py index 84cd74d790..bfa5982633 100644 --- a/salt/modules/timezone.py +++ b/salt/modules/timezone.py @@ -60,7 +60,7 @@ def get_zone(): 'consider using timezone.get_zonecode or timezone.zonecompare') elif 'Solaris' in __grains__['os_family']: cmd = 'grep "TZ=" /etc/TIMEZONE' - out = __salt__['cmd.run'](cmd).split('=') + out = __salt__['cmd.run'](cmd, python_shell=True).split('=') ret = out[1].replace('"', '') return ret @@ -217,7 +217,8 @@ def get_hwclock(): elif 'Debian' in __grains__['os_family']: #Original way to look up hwclock on Debian-based systems cmd = 'grep "UTC=" /etc/default/rcS | grep -vE "^#"' - out = __salt__['cmd.run'](cmd, ignore_retcode=True).split('=') + out = __salt__['cmd.run']( + cmd, ignore_retcode=True, python_shell=True).split('=') if len(out) > 1: if out[1] == 'yes': return 'UTC' @@ -229,7 +230,7 @@ def get_hwclock(): return __salt__['cmd.run'](cmd) elif 'Gentoo' in __grains__['os_family']: cmd = 'grep "^clock=" /etc/conf.d/hwclock | grep -vE "^#"' - out = __salt__['cmd.run'](cmd).split('=') + out = __salt__['cmd.run'](cmd, python_shell=True).split('=') return out[1].replace('"', '') elif 'Solaris' in __grains__['os_family']: if os.path.isfile('/etc/rtc_config'):