chevah/salt — pull request #1 by dumol (2014-03-06 09:19:09+00:00)
Title: Made the shell shim compatible with AIX.

Before:
```
$ salt-ssh -c ./etc/salt/ '*aix*' test.ping
[WARNING ] Warning: sshpass is not present, so password-based authentication is not available.
aix-aix-5.3-ppc64:
----------
retcode:
127
stderr:
command-line line 0: Unsupported option "gssapiauthentication"
/bin/sh[28]: 0652-141: 0403-012 A test command parameter is not valid.
/bin/sh[28]: 0652-141: 0403-012 A test command parameter is not valid.
/bin/sh[28]: 0652-141: 0403-012 A test command parameter is not valid.
/bin/sh[28]: 0652-141: 0403-012 A test command parameter is not valid.
/bin/sh[47]: 0652-141: 0403-012 A test command parameter is not valid.
/bin/sh[47]: 0652-141: 0403-012 A test command parameter is not valid.
The following required Packages are missing: md5 or md5sum

stdout:

```
After:
```
salt-ssh -c ./etc/salt/ '*aix*' test.ping
[WARNING ] Warning: sshpass is not present, so password-based authentication is not available.
aix-aix-5.3-ppc64:
True
```
This also fixes failed tests such as:
```
linux-ubuntu-1204-x64:
----------
retcode:
2
stderr:
/bin/sh: 35: [: /usr/bin/python2.7: unexpected operator
/bin/sh: 60: [: /usr/bin/md5sum: unexpected operator
```
And replaces the generic error:
```
freebsd-freebsd-10.0-x86:
----------
retcode:
2
stderr:
/usr/local/bin/python2.7: can't open file '/tmp/.salt/salt-call': [Errno 2] No such file or directory

stdout:

```
with a specific new one:
```
freebsd-freebsd-10.0-x86:
----------
retcode:
1
stderr:
Mismatched checksum for /tmp/.salt/salt-thin.tgz

stdout:

```
Tested on a variety of OS's:
```
$ salt-ssh -c ./etc/salt/ '*' grains.item os oscodename osfinger os_family osfullname osarch cpuarch | grep stdout -A1[WARNING ] Warning: sshpass is not present, so password-based authentication is not available.
stdout:
{"osarch": "x86_64", "cpuarch": "x86_64", "osfullname": "Gentoo", "os_family": "Gentoo", "oscodename": "", "os": "Gentoo"}
--
stdout:
{"osarch": "x86_64", "cpuarch": "x86_64", "osfullname": "SUSE", "os_family": "Suse", "oscodename": "n.a", "os": "SUSE"}
--
stdout:
{"osarch": "i386", "cpuarch": "i686", "osfullname": "Ubuntu", "os_family": "Debian", "oscodename": "lucid", "osfinger": "Ubuntu-10.04", "os": "Ubuntu"}
--
stdout:
{"osarch": "x86_64", "cpuarch": "x86_64", "osfullname": "Red Hat Enterprise Linux AS", "os_family": "RedHat", "oscodename": "Nahant Update 8", "osfinger": "Red Hat Enterprise Linux AS-4", "os": "RedHat"}
--
stdout:
{"osarch": "amd64", "cpuarch": "x86_64", "osfullname": "Ubuntu", "os_family": "Debian", "oscodename": "precise", "osfinger": "Ubuntu-12.04", "os": "Ubuntu"}
--
stdout:
{"osarch": "i386", "os_family": "FreeBSD", "os": "FreeBSD", "cpuarch": "i386"}
--
stdout:
{"osarch": "0001963AD300", "os_family": "AIX", "os": "AIX", "cpuarch": "0001963AD300"}
--
stdout:
{"osarch": "sparc", "cpuarch": "sparc64", "osfullname": "Debian GNU/Linux", "os_family": "Debian", "oscodename": "", "os": "Debian"}
```