pxe: Adding Redhat Support

The fix from commit 250538a821695c9072e296abf91ac52aed521703 shall be
applied to pxe also.

So let's make the code generic and reusable between health & pxe.