Re: NetworkManager on Debian



Le vendredi 02 mai 2008 à 00:29 +0300, Hristo Hristov a écrit :
> > > 3) I'm trying to make NM work with resolvconf. I want to pass DNS configurations 
> > > received from DHCP to the dispatcher and then to the dispatcher script. I have no 
> > > knowledge of dbus, so I made an ugly patch to pass the first nameserver configuration.
> > > Could you tell me what should be the correct way of passing the nameservers 
> > > to the dispatcher?
> > 
> > You shouldn't be using the dispatcher for this or any other core
> > functionality of NM.  Instead, what information does resolvconf need,
> > and how do you call it?  Can we detect when the user wishes to run with
> > resolvconf enabled?  I view resolvconf as just one more method to
> > handle /etc/resolv.conf, in addition to the (broken) caching-nameserver
> > code and the direct resolv.conf manipulation.  I'd rather teach NM about
> > resolvconf properly if we can.
> In Debian if resolvconf is installed, then it is used to generate /etc/resolv.conf
> In src/backends/NetworkManagerDebian.c nm_system_should_modify_resolv_conf returns 
> false if resolvconf is found. Then the dispatcher calls the script included in 
> the deb package /etc/NetworkManager/dispatcher.d/01ifupdown that in it's turn 
> executes run-parts /etc/network/if-up.d and that
> calls /etc/network/if-up.d/000resolvconf. This script
> calls /sbin/resolvconf with the proper parameters to create 
> /etc/resolv.conf
> Michael Biebl also don't like and don't use resolvconf, but IMHO
> this is the correct way to update /etc/resolv.conf when resolvconf
> is installed (on Debian). In v0.6.6 of NM when it queried dhcdbd 
> for the dhcp configuration, it used to call /sbin/resolvconf with
> the proper parameters and this way /etc/resolv.conf was updated.
> Now that this is changed I'm trying to use the dispatcher to call
> /sbin/resolvconf. I'm not sure that this is correct and that it will
> be used in Debian...

I plan on making a hack to get resolvconf "working" (well getting it to
add the NM data) in debian packages from Michael (expected to be the
next debian ones).
Though as it seems in the end we will need something in NetworkManager
per se and that I know near to nothing about resolv.conf and the best
way to deal with domains regarding the extends of the use cases I am
turning to the list for insights.

As of your comments and by the fact that Michael packages do not include
the dispatcher I am going for a more deep change which would be to (at
first) only changing nm-named-manager.c rewrite_resolv_conf and have it
detect if resolvconf is installed (via g_find_program_in_path) . If so I
would do like told in
http://lists.debian.org/debian-devel/2003/07/msg00438.html that is "echo
"<DATA>" | resolvconf -a $IFACE" instead of writing to a file (so
dupicating the fprintf with filling a buffer that I would end up sending
to resolvconf. 
What is missing yet is how do I get the interface in rewrite_resolv_conf
and well I need guidance as to where this should belong if I want it to
be included once as the discussion about this died right at this point.

Best regards
Alban




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