Positive solutions of Dirichlet and homoclinic type for a class of singular equations