replace hyphens with underscore in hostnames.