Updated configuration script to handle multiple distributions