engine: resources: Improve hostname change message

Make it clearer where empty strings are, and that it already happened.
This commit is contained in:
James Shubin
2025-01-17 23:58:26 -05:00
parent cace2bacb8
commit 12a0600d38

View File

@@ -242,10 +242,10 @@ func (obj *HostnameRes) updateHostnameProperty(object dbus.BusObject, expectedVa
} }
// attempting to apply the changes // attempting to apply the changes
obj.init.Logf("Changing %s: %s => %s", property, propertyValue, expectedValue)
if err := object.Call("org.freedesktop.hostname1."+setterName, 0, expectedValue, false).Err; err != nil { if err := object.Call("org.freedesktop.hostname1."+setterName, 0, expectedValue, false).Err; err != nil {
return false, errwrap.Wrapf(err, "failed to call org.freedesktop.hostname1.%s", setterName) return false, errwrap.Wrapf(err, "failed to call org.freedesktop.hostname1.%s", setterName)
} }
obj.init.Logf("changed %s: `%s` => `%s`", property, propertyValue, expectedValue)
// all good changes should now be applied again // all good changes should now be applied again
return false, nil return false, nil