Refactor initscripts into distro-independent and distro-specific pieces.