saltstack/salt — pull request #937 by SEJeff (2012-03-17 17:30:44+00:00)
Title: Fix linux sysctl

I found a bug with a state like:

```yaml
net.core.rmem_max:
sysctl:
- present
- value: 16777216

net.core.wmem_max:
sysctl:
- present
- value: 16777216

net.ipv4.tcp_rmem:
sysctl:
- present
- value: 4096 87380 16777216

net.ipv4.tcp_wmem:
sysctl:
- present
- value: 4096 87380 16777216
```

```sysctl.assign``` was doing two things suboptimally:

1. cmd = 'sysctl -w {0}={1}'.format(name, value), which doesn't quote the multi-value sysctls above
2. It was not properly checking the return code of sysctl -w and would say all was well when it was not

This fixes both of those bugs and handles errors a bit more robustly