Re: svn commit: r224659 - head/etc

From: Doug Barton <dougb_at_FreeBSD.org>
Date: Fri, 05 Aug 2011 17:07:56 -0700
Ed,

First off, thanks for taking a look at this. I've always been
uncomfortable with our default nsswitch.conf file because most users do
not use nis, and although everything works with our (previous) default
it produces errors in the logs that are very non-obvious.

That said, I think the approach you have here needs some tweaking. You
only posted it to -current yesterday, and I hadn't even gotten past
thinking "Ok, that's a good direction to start looking" before it was
committed already. :) I know deadlines are tight prior to the release,
but I don't think they are _that_ tight.

I have 2 suggestions. The first is that if we go this way that we tweak
the sed statements to comment out the _compat entries rather than
deleting them. This will accomplish the same thing but be slightly less
confusing for users who eventually want to implement nis. This can be
accomplished like this:

-e 's/.*_compat:/# &/' -e 's/compat$/files/'

The other issue is that due to the way that mergemaster works by default
users who have existing /etc/nsswitch.conf files (which should be pretty
close to 100%) won't see this change because it doesn't affect the
$FreeBSD$ tag. If we decide to keep things this way then I would suggest
adding a comment to that file so that it will get picked up.

However, I would much rather see us actually change the default file.
Users who are going to enable nis will already know that this file needs
to be tweaked, and by using more sensible defaults we'll be more
relevant to the majority of our userbase. So I propose the attached
(along with reverting your change obviously).


hth,

Doug


On 08/05/2011 10:33, Ed Schouten wrote:
> Author: ed
> Date: Fri Aug  5 17:33:12 2011
> New Revision: 224659
> URL: http://svn.freebsd.org/changeset/base/224659
> 
> Log:
>   Remove NIS entries from /etc/nsswitch.conf for WITHOUT_NIS.
>   
>   We already modify various configuration files in /etc based on build
>   configuration. This is not done for nsswitch.conf right now when setting
>   WITHOUT_NIS. This breaks various utilities, including crond, that depend
>   on working databases.
>   
>   Approved by:	re (kib)
>   MFC after:	1 month
> 
> Modified:
>   head/etc/Makefile
> 
> Modified: head/etc/Makefile
> ==============================================================================
> --- head/etc/Makefile	Fri Aug  5 17:15:46 2011	(r224658)
> +++ head/etc/Makefile	Fri Aug  5 17:33:12 2011	(r224659)
> _at__at_ -256,6 +256,10 _at__at_ distribution:
>  	    ${DESTDIR}/boot/device.hints
>  .endif
>  .endif
> +.if ${MK_NIS} == "no"
> +	sed -i "" -e '/_compat:/d' -e 's/compat/files/' \
> +		${DESTDIR}/etc/nsswitch.conf
> +.endif
>  
>  distrib-dirs:
>  	mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
> 



-- 

	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/


Received on Fri Aug 05 2011 - 22:07:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:16 UTC