Merge branch 'master' into install_integration

This commit is contained in:
Nico Schottelius 2014-01-21 17:17:20 +01:00
commit 26fcbbb4ef
9 changed files with 84 additions and 21 deletions

View file

@ -58,7 +58,7 @@ case "$state_should" in
# Only replace ' with '"'"' and keep \ as they are
line_sanitised=$(cat "$__object/parameter/line" | sed -e "s/'/'\"'\"'/g")
echo "printf '%s\n' '$line_sanitised' >> $file"
printf '%s' "printf '%s\n' '$line_sanitised' >> $file"
;;
absent)

View file

@ -188,7 +188,7 @@ class Local(object):
Return the output as a string.
"""
command = ["/bin/sh", "-e"]
command = [ os.environ.get('CDIST_LOCAL_SHELL',"/bin/sh") , "-e"]
command.append(script)
return self.run(command=command, env=env, return_output=return_output, message_prefix=message_prefix)

View file

@ -113,7 +113,7 @@ class Remote(object):
"""
command = ["/bin/sh", "-e"]
command = [ os.environ.get('CDIST_REMOTE_SHELL',"/bin/sh") , "-e"]
command.append(script)
return self.run(command, env, return_output)

View file

@ -45,10 +45,7 @@ class Shell(object):
"""Select shell to execute, if not specified by user"""
if not self.shell:
if 'SHELL' in os.environ:
self.shell = os.environ['SHELL']
else:
self.shell = "/bin/sh"
self.shell = os.environ.get('SHELL',"/bin/sh")
def _init_files_dirs(self):
self.local.create_files_dirs()