Re: [PATH] Support resolvconf
- From: Dan Williams <dcbw redhat com>
- To: Roy Marples <roy marples name>
- Cc: networkmanager-list gnome org
- Subject: Re: [PATH] Support resolvconf
- Date: Mon, 25 Aug 2008 11:05:12 -0400
On Sun, 2008-08-24 at 12:13 +0100, Roy Marples wrote:
> On Sun, 2008-08-24 at 12:58 +0200, Alexander Sack wrote:
> > On Sun, Aug 24, 2008 at 08:24:59AM +0100, Roy Marples wrote:
> > >
> > > There's no real need to push it back.
> > > NM currently folds domain into searches, so there's no need to actually
> > > use domain at all.
> > >
> > > Attached is a new patch, taking all the above into account.
> > > Also makes this less intrusive than the first pass :)
> >
> >
> > OK, this patch looks fine. Only glitch is that it doesnt properly pop
> > the config in all cases. The following does the trick for me (by
> > checking whether searches/nameservers actually have a non-null-length
> > string at all).
> >
> > diff -u b/src/named-manager/nm-named-manager.c network-manager-0.7~~svn20080818t061112+eni1/src/named-manager/nm-named-manager.c
> > --- b/src/named-manager/nm-named-manager.c (working copy)
> > +++ network-manager-0.7~~svn20080818t061112+eni1/src/named-manager/nm-named-manager.c
> > @@ -289,7 +289,8 @@
> > return FALSE;
> > }
> >
> > - if (searches || nameservers) {
> > + if ( (searches && *searches && strlen(*searches)) ||
> > + (nameservers && *nameservers && strlen(*nameservers))) {
> > cmd = g_strconcat (resolvconf, " -a ", "NetworkManager", NULL);
> > nm_info ("(%s): writing resolv.conf to %s", iface, resolvconf);
> > if ((f = popen (cmd, "w")) == NULL)
> >
>
> That should not be needed, unless a config entry itself contains a null
> string. In this instance, probably better to fix it at source if input
> rather than in the processing here.
100% correct.
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]