saltstack/salt — pull request #2230 by romeotheriault (2012-10-12 09:00:46+00:00)
Title: chgroup updates for linux and freebsd

I went to update linux and freebsd's chgroups return code so it would work properly and found a few other things off in them.

* The '-a' (append) option in usermod on linux cannot be at the end of the command as it was, so I moved it towards the front of the command. Now the append option works for linux.

* Freebsd's 'pw usermod' doesn't have an '-a' (append) option so I removed that and handle it like I did in the solaris module. Which is just to grab the current list of groups the user is assigned to and add it to the new groups they want the user assigned to. It essentially mimics the '-a' option even though the platform doesn't provide it.