Updated for el4 and non-linux support.