NetworkManager/explain-dns1-dns2.patch
Daniel Williams c9bde83e4c - Ensure that mobile broadband cards are powered up before trying to use
them
- Hostname changing support (rh #441453)
- Fix mobile broadband secret requests to happen less often
- Better handling of default devices and default routes
- Better information in tooltips and notifications
- Various UI cleanups; hide widgets that aren't used (rh #465397, rh
    #465395)
- Accept different separators for DNS servers and searches
- Make applet's icon accurately reflect signal strength of the current AP
2008-10-12 12:43:44 +00:00

28 lines
1.2 KiB
Diff

diff -up NetworkManager-0.7.0/src/named-manager/nm-named-manager.c.explain-dns1-dns2 NetworkManager-0.7.0/src/named-manager/nm-named-manager.c
--- NetworkManager-0.7.0/src/named-manager/nm-named-manager.c.explain-dns1-dns2 2008-09-15 10:33:29.000000000 -0400
+++ NetworkManager-0.7.0/src/named-manager/nm-named-manager.c 2008-10-12 08:25:48.000000000 -0400
@@ -243,7 +243,7 @@ write_resolv_conf (FILE *f, const char *
g_free (tmp_str);
}
- if (nameservers) {
+ if (nameservers && g_strv_length (nameservers)) {
GString *str;
int num;
@@ -265,6 +265,14 @@ write_resolv_conf (FILE *f, const char *
}
nameservers_str = g_string_free (str, FALSE);
+ } else {
+ nameservers_str = g_strdup_printf ("\n\n%s%s%s%s%s%s",
+ "# No nameservers found; try putting DNS servers into your\n",
+ "# ifcfg files in /etc/sysconfig/network-scripts like so:\n",
+ "#\n",
+ "# DNS1=xxx.xxx.xxx.xxx\n",
+ "# DNS2=xxx.xxx.xxx.xxx\n",
+ "# DOMAIN=lab.foo.com bar.foo.com\n");
}
if (fprintf (f, "%s%s%s",