git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1383 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Robert Love
2006-01-23 21:17:59 +00:00
parent d1f6f5dde4
commit ae0d923ce3
2 changed files with 5 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
2006-01-23 Robert Love <rml@novell.com>
Patch by Timo Hoenig <thoenig@suse.de>:
* dhcp-manager/nm-dhcp-manager.c, nm-device.c, nm-ip4-config.c,
nm-ip4-config.h, NetworkManagerSystem.h: Save the hostname reported
by DHCP and pass it to the backends, allowing distribution-specific

View File

@@ -1037,9 +1037,12 @@ void nm_system_set_hostname (NMIP4Config *config)
if (!strcmp (buf, "yes")) {
hostname = nm_ip4_config_get_hostname (config);
if (hostname && sethostname (hostname, strlen (hostname)) < 0)
if (hostname) {
nm_info ("Setting hostname to %s\n", hostname);
if (sethostname (hostname, strlen (hostname)) < 0)
nm_warning ("Could not set hostname.");
}
}
free (buf);
out_close: