These last 4 lines (and in fact everything above from "Detect the correct ps tool to use" except PS, VZPS and RUDDERPS definitions) are specific to the function check_and_fix_cfengine_processes. We shouldn't be running the ps command unless that function is called.