Commit 60785e33 authored by Robert Love's avatar Robert Love Committed by Robert Love
Browse files

2005-10-17  Robert Love  <rml@novell.com>

        *  src/backends/NetworkManagerDebian.c,
           src/backends/NetworkManagerRedHat,
           src/backends/NetworkManagerSuSE.c: allow '#' as a valid resolv.conf
           comment delimiter.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1028 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 2d747adc
2005-10-17 Robert Love <rml@novell.com>
* src/backends/NetworkManagerDebian.c,
src/backends/NetworkManagerRedHat,
src/backends/NetworkManagerSuSE.c: allow '#' as a valid resolv.conf
comment delimiter.
2005-10-17 Robert Love <rml@novell.com>
* src/backends/NetworkManagerSuSE.c: use SYSCONFDIR not open-coded
......
......@@ -436,7 +436,7 @@ static void set_ip4_config_from_resolv_conf (const char *filename, NMIP4Config *
char *line = split_contents[i];
/* Ignore comments */
if (!line || (line[0] == ';'))
if (!line || (line[0] == ';') || (line[0] == '#'))
continue;
line = g_strstrip (line);
......
......@@ -393,7 +393,7 @@ static void set_ip4_config_from_resolv_conf (const char *filename, NMIP4Config *
char *line = split_contents[i];
/* Ignore comments */
if (!line || (line[0] == ';'))
if (!line || (line[0] == ';') || (line[0] == '#'))
continue;
line = g_strstrip (line);
......
......@@ -358,14 +358,14 @@ static void set_ip4_config_from_resolv_conf (const char *filename, NMIP4Config *
if (!(split_contents = g_strsplit (contents, "\n", 0)))
goto out;
len = g_strv_length (split_contents);
for (i = 0; i < len; i++)
{
char *line = split_contents[i];
/* Ignore comments */
if (!line || (line[0] == ';'))
if (!line || (line[0] == ';') || (line[0] == '#'))
continue;
line = g_strstrip (line);
......@@ -400,7 +400,7 @@ static void set_ip4_config_from_resolv_conf (const char *filename, NMIP4Config *
}
else if ((strncmp (line, "nameserver", 10) == 0) && (strlen (line) > 10))
{
guint32 addr = (guint32) (inet_addr (line + 11));
guint32 addr = (guint32) (inet_addr (line + 11));
if (addr != (guint32) -1)
nm_ip4_config_add_nameserver (ip4_config, addr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment