2010-11-03 19:00:41 +00:00
|
|
|
diff -up NetworkManager-0.8.2/src/dns-manager/nm-dns-manager.c.explain-dns1-dns2 NetworkManager-0.8.2/src/dns-manager/nm-dns-manager.c
|
|
|
|
--- NetworkManager-0.8.2/src/dns-manager/nm-dns-manager.c.explain-dns1-dns2 2010-10-18 18:44:05.000000000 -0500
|
|
|
|
+++ NetworkManager-0.8.2/src/dns-manager/nm-dns-manager.c 2010-11-03 13:51:56.614584001 -0500
|
|
|
|
@@ -358,7 +358,7 @@ write_resolv_conf (FILE *f, const char *
|
|
|
|
|
|
|
|
str = g_string_new ("");
|
2008-08-27 20:56:34 +00:00
|
|
|
|
|
|
|
- if (nameservers) {
|
|
|
|
+ if (nameservers && g_strv_length (nameservers)) {
|
2010-11-03 19:00:41 +00:00
|
|
|
int num = g_strv_length (nameservers);
|
2008-10-12 12:43:44 +00:00
|
|
|
|
2010-11-03 19:00:41 +00:00
|
|
|
for (i = 0; i < num; i++) {
|
|
|
|
@@ -374,6 +374,14 @@ write_resolv_conf (FILE *f, const char *
|
|
|
|
g_string_append (str, nameservers[i]);
|
|
|
|
g_string_append_c (str, '\n');
|
2008-08-27 20:56:34 +00:00
|
|
|
}
|
|
|
|
+ } else {
|
2010-11-03 19:00:41 +00:00
|
|
|
+ g_string_append_printf (str, "\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");
|
2008-08-27 20:56:34 +00:00
|
|
|
}
|
2008-04-30 19:43:19 +00:00
|
|
|
|
2010-11-03 19:00:41 +00:00
|
|
|
nameservers_str = g_string_free (str, FALSE);
|