/TECH/ NIS install, fai scripts?

Henning Glawe glaweh at physik.fu-berlin.de
Wed Oct 26 08:13:39 CEST 2005


On Tue, Oct 25, 2005 at 04:38:31PM -0400, Dan B. Phung wrote:
> then...I guess what I really need is to append the contents of my files to
> these files.  is there a flag for append for fcopy, or is this best done
> in a hook?  for example, I want to append:
> 
> +foo::0:0:::
> 
> to the /etc/passwd file.  I want to put a list of these entries to append
> in a file.  What have others done in the past to install NIS?

fcopy for: 
/etc/nsswitch.conf
/etc/defaultdomain
/etc/pam.d/passwd
/etc/yp.conf

cfengine for modifying /etc/{passwd,group}:

$FAI/scripts/NIS/S10passwd.cf:

==========================================================
#! /usr/bin/cfengine
# $Id: S10passwd.cf,v 1.1 2002/07/05 12:59:35 glaweh Exp $
control:
	OutputPrefix = ("${cf_prefix}")
	actionsequence = ( editfiles )
	
editfiles:
	any::
		{ ${target}/etc/passwd 
			AppendIfNoSuchLine "+::::::"
		}
		
		{ ${target}/etc/group
			AppendIfNoSuchLine "+:::"
		}
==========================================================


-- 
c u
henning



More information about the linux-fai mailing list