laradji/zabbix — pull request #145 by ftclausen (2014-03-03 02:42:55+00:00)
Title: RHEL 5 does not support "manage home" usermod option.

In my testing it seems that Red Hat 5 and below does not support the "manage home" usermod option - when Chef runs with that option enabled the run fails due to usermod complaining. This is despite the help text in usermod implying that you can run "-d" and "-m" together; I have not been able to get it to work on older RHEL machines.

This PR detects RHEL 5 and disables that option. It should not have an adverse impact on the agent and in my testing it still seems to work fine. If more distros do not support this option then the code may have to be refactored into a case statement.