Cleaner implementation for centos support.