DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Advanced NIS administration

Adding Makefile entries

For the Makefile to work the input files for any map of your own that you wish to propagate through NIS, you must modify the Makefile to add an entry for that database. To add an entry to the Makefile, perform the following procedure:

  1. Edit the Makefile, and modify the line that starts with the word ``all:'' by adding the name of the database you want to add.

    For example, if the NFS automounter databases auto.home and auto.master did not already exist in the Makefile, you would add them to the ``all'' rule like this:

    all: ypservers passwd group hosts ethers networks rpc services protocols \
    	netgroup aliases publickey netid netmasks TIMEZONE bootparams \
    	auto.home auto.master
    
    The order of databases is not relevant, but the white space at the beginning of the continuation lines must be a tab, not spaces.

  2. Add a dependency line for the database to the end of the Makefile, as shown in this example:
    auto.direct: auto.direct.time
    auto.home: auto.home.time
    

  3. Add an entry for the database to the middle of the file, as shown in this example:
    auto.direct.time:  $(DIR)/auto.direct
    	@if [ -f $(DIR)/auto.direct ]; then \
    		sed -e "/^#/d" -e s/#.*$$// $(DIR)/auto.direct \
    		| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/auto.direct; \
    		touch auto.direct.time; \
    		$(ECHO)40 "updated auto.direct\n"; \
    		if [ ! $(NOPUSH) ]; then \
    			$(YPPUSH) auto.direct; \
    			$(ECHO)41 "pushed auto.direct\n"; \
    		fi \
    	else \
    		$(ECHO)42 "could not find $(DIR)/auto.direct\n"; \
    	fi
    

    The sed script eliminates comment and empty lines and feeds the output to makedbm.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004