Re: Gentoo Backend
- From: Thomas Hood <jdthood aglu demon nl>
- To: networkmanager-list gnome org
- Subject: Re: Gentoo Backend
- Date: Sat, 23 Jul 2005 05:29:33 +0200
> /*
> @@ -178,12 +224,21 @@
> *
> * Make glibc/nscd aware of any changes to the resolv.conf file by
> * restarting nscd. Only restart if already running.
> + * Invalidate the nscd host cache, if it exists, since
> + * we changed resolv.conf.
> *
> */
> void nm_system_update_dns (void)
> {
> - if(nm_spawn_process ("/etc/init.d/nscd status"))
> + #ifdef NM_NO_NAMED
> + if (nm_spawn_process ("/etc/init.d/nscd status") != 0)
> nm_spawn_process ("/etc/init.d/nscd restart");
> +
> + nm_info("Clearing nscd hosts cache.");
> + nm_spawn_process("/usr/sbin/nscd -i hosts");
> + #else
> + nm_spawn_process("/usr/sbin/killall -q nscd");
> + #endif
> }
Please note that invalidating the hosts cache will not make nscd
re-read /etc/resolv.conf. To make nscd re-read /etc/resolv.conf
you really need to restart it.
--
Thomas Hood
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]