The following procedure describes how to add and delete databases from the Makefile.
This procedure requires that you have already configured an NIS master server.
For more information about obtaining the appropriate rights to perform specific tasks, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.
all: passwd group hosts ethers networks rpc services protocols \ netgroup bootparams aliases netid netmasks \ audit_user auth_attr exec_attr prof_attr \ auto_direct
The order of the entries is not relevant, but the blank space at the beginning of the continuation lines must be a Tab, not spaces.
auto_direct: auto_direct.time auto_home: auto_home.time
auto_direct.time: $(DIR)/auto_direct @(while read L; do echo $$L; done < $(DIR)/auto_direct $(CHKPIPE)) | \ (sed -e "/^#/d" -e "s/#.*$$//" -e "/^ *$$/d" $(CHKPIPE)) | \ $(MAKEDBM) - $(YPDBDIR)/$(DOM)/auto_direct; @touch auto_direct.time; @echo "updated auto_direct"; @if [ ! $(NOPUSH) ]; then $(YPPUSH) auto_direct; fi @if [ ! $(NOPUSH) ]; then echo "pushed auto_direct"; fi
CHKPIPE makes certain that the operations to the left of the pipe (|) are successfully completed before piping the results to next commands. If the operations to the left of the pipe do not successfully complete, the process is terminated with a NIS make terminated message.
The while loop at the beginning is designed to eliminate any backslash-extended lines in the input file. The sed script eliminates comment and empty lines.
Follow the same procedure for all other automounter maps, such as auto_home or any other non-default maps.
# make mapname
where mapname is the name of the map you want to make.
If you do not want the Makefile to produce maps for a specific database, edit the Makefile as follows.
For example, to delete the hosts database, the hosts: hosts.time entry should be removed.