about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@debian.org>2008-10-03 11:40:53 +0000
committerSjoerd Simons <sjoerd@debian.org>2008-10-03 11:40:53 +0000
commit6718f3ccce8e98824b7db929a4eb49cac218148e (patch)
treeacfe6520d442086540b9fe1b92325e4f1b2f1401
parent25e8a2ff6e2dd54bfa2f222a7ee935e3749ec523 (diff)
* debian/patches/03-nm_get_debian_hostname.patch:
  - Added. Temporary minimal patch to get hostname from /etc/hostname. There
    is work being done upstream for a more extensive version.

git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/experimental/networkmanager@2434 ceb527fc-18e6-0310-9fe2-813c157c29e7
-rw-r--r--debian/changelog5
-rw-r--r--debian/patches/03-nm_get_debian_hostname.patch49
-rw-r--r--debian/patches/series1
3 files changed, 54 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 5ff17bc4..d5954a51 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -30,8 +30,11 @@ network-manager (0.7.0~svn4142-1) UNRELEASED; urgency=low
   [ Sjoerd Simons ]
   * debian/control: Add build-depend on uuid-dev
   * Update the various symbols files
+  * debian/patches/03-nm_get_debian_hostname.patch:
+    - Added. Temporary minimal patch to get hostname from /etc/hostname. There
+      is work being done upstream for a more extensive version.
 
- -- Sjoerd Simons <sjoerd@debian.org>  Thu, 02 Oct 2008 23:39:59 +0100
+ -- Sjoerd Simons <sjoerd@debian.org>  Fri, 03 Oct 2008 12:39:14 +0100
 
 network-manager (0.6.6-1) unstable; urgency=low
 
diff --git a/debian/patches/03-nm_get_debian_hostname.patch b/debian/patches/03-nm_get_debian_hostname.patch
new file mode 100644
index 00000000..32bc595c
--- /dev/null
+++ b/debian/patches/03-nm_get_debian_hostname.patch
@@ -0,0 +1,49 @@
+Index: system-settings/plugins/ifupdown/plugin.c
+===================================================================
+--- system-settings/plugins/ifupdown/plugin.c	(revision 4142)
++++ system-settings/plugins/ifupdown/plugin.c	(working copy)
+@@ -293,9 +293,15 @@
+ 	case NM_SYSTEM_CONFIG_INTERFACE_PROP_CAPABILITIES:
+ 		g_value_set_uint (value, NM_SYSTEM_CONFIG_INTERFACE_CAP_NONE);
+ 		break;
+-	case NM_SYSTEM_CONFIG_INTERFACE_PROP_HOSTNAME:
+-		g_value_set_string (value, "");
++	case NM_SYSTEM_CONFIG_INTERFACE_PROP_HOSTNAME: {
++		char *hostname;
++		if (g_file_get_contents ("/etc/hostname", &hostname, NULL, NULL)) {
++			g_value_take_string (value, hostname);
++		} else {
++			g_value_set_string (value, "");
++		}
+ 		break;
++	}
+ 	default:
+ 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ 		break;
+Index: system-settings/src/dbus-settings.c
+===================================================================
+--- system-settings/src/dbus-settings.c	(revision 4142)
++++ system-settings/src/dbus-settings.c	(working copy)
+@@ -240,17 +240,12 @@
+ 		 * that provides one.
+ 		 */
+ 		for (iter = priv->plugins; iter; iter = iter->next) {
+-			NMSystemConfigInterfaceCapabilities caps = NM_SYSTEM_CONFIG_INTERFACE_CAP_NONE;
++			char *hostname = NULL;
+ 
+-			g_object_get (G_OBJECT (iter->data), NM_SYSTEM_CONFIG_INTERFACE_CAPABILITIES, &caps, NULL);
+-			if (caps & NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_HOSTNAME) {
+-				char *hostname = NULL;
+-
+-				g_object_get (G_OBJECT (iter->data), NM_SYSTEM_CONFIG_INTERFACE_HOSTNAME, &hostname, NULL);
+-				if (hostname && strlen (hostname)) {
+-					g_value_take_string (value, hostname);
+-					break;
+-				}
++			g_object_get (G_OBJECT (iter->data), NM_SYSTEM_CONFIG_INTERFACE_HOSTNAME, &hostname, NULL);
++			if (hostname && strlen (hostname)) {
++				g_value_take_string (value, hostname);
++				break;
+ 			}
+ 		}
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 5bb8c3f1..69c29189 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 02-dbus_access_network_manager.patch
+03-nm_get_debian_hostname.patch