puppetlabs/puppetlabs-cve20113872 — pull request #70 by jeffmccune (2011-10-24 21:47:51+00:00)
Title: Fix premature remediation exit on idx increment

There is an issue where Lucid systems do not treat set -e the same as
CentOS systems when running the remediation process shell scripts.

In particular, incrementing a variable in bash from 0 to 1 will always
return an exit code ($?) of 1 even though it increments the variable
properly. However, on CentOS 5.5. systems set -e ignores this "failure"
while debian based systems appear to treat the non-zero exit code as
grounds to abort the script via set -e.

This patch starts all idx index variables at "1" to avoid this issue.
When incrementing from any non-zero positive integer the proper exit
code of 0 is returned.

Closes #69