[users] Don't set GS hostname if hostname.location is None

This commit is contained in:
Adriaan de Groot 2022-04-11 11:18:30 +02:00
parent c5c546d290
commit a12c6de2ef

View File

@ -240,6 +240,11 @@ Config::loginNameStatus() const
void
Config::setHostName( const QString& host )
{
if ( hostNameAction() != HostNameAction::EtcHostname && hostNameAction() != HostNameAction::SystemdHostname )
{
cDebug() << "Ignoring hostname" << host << "No hostname will be set.";
return;
}
if ( host != m_hostName )
{
m_customHostName = !host.isEmpty();