jgoldschrafe/puppet-selinux_types — pull request #6 by mwoodson (2013-07-18 14:15:57+00:00)
Title: changed the way semange is called so output can be captured

We installed this type and it would apply the selinux port cleanly on the first run. On following runs, the puppet type would cause an error while trying to reapply the same selinux port. After much debugging, we found out that the way semanage was being called in this call:

out = semanage('port', '-nl')

out was never being populated. Therefore, the exists? function always failed because there was nothing to check. After making the changes, everything works as expected.

This was tested on RHEL 6.4 and puppet 2.7