the previous fix for #4465 assumed that the NetworkManager takes care of updating /etc/hosts with the new hostname, but testing shows it doesn't. This change ensures that the change is always added to /etc/hosts when the name changes.
the previous fix for #4465 assumed that the NetworkManager takes care of updating /etc/hosts with the new hostname, but testing shows it doesn't. This change ensures that the change is always added to /etc/hosts when the name changes.