Replace "-" with "_" in hostname.