[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH: resolv.conf edit problem

From: Alan Sparks
Subject: PATCH: resolv.conf edit problem
Date: Thu, 07 Jun 2001 15:33:39 -0600

Went to do some resolver config editing.  Put in a rulebase like:


Was surprised to see the old "nameserver" entries still in place after
the run.

Problem seems that cfengine does not delete old entries from the list it
creates as the new image, a copy of the existing config.  So nonexisting
entries get added, but old entries are never dropped.

I patched cfengine-1.6.3/src/do.c as follows, to recreate the
nameservers in the filebase list before adding the new ones:

*** do.c.orig   Thu Jun  7 15:29:23 2001
--- do.c        Thu Jun  7 15:29:09 2001
*** 2010,2015 ****
--- 2010,2017 ----
+ while (DeleteItemStarting(&filebase,"nameserver "))
+   ;
  sprintf(VBUFF,"domain %s",ToLowerStr(VDOMAIN));

With this change, cfengine recreates the resolv.conf properly, with only
the specified nameservers.

Alan Sparks, Sr. UNIX Administrator     address@hidden
Quris, Inc.                             (720) 836-2058

reply via email to

[Prev in Thread] Current Thread [Next in Thread]