refactoring of distro-specific scripts