I'm not a big fan of more than one elsif.

The "detect_distro_from_etc_issue" and "detect_distro_from_etc_release" logic can be moved to methods in a future pull request to simplify the logic here.