The following procedure describes how to add and delete databases from the Makefile.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Chapter 9, Using Role-Based Access Control (Tasks), in System Administration Guide: Security Services.
Modify the line that starts with the word all by adding the name(s) of the database you want to add:
all: passwd group hosts ethers networks rpc services protocols \ netgroup bootparams aliases netid netmasks \ audit_user auth_attr exec_attr prof_attr \ auto_direct auto_home auto_direct.time auto_home.time
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.
Add the following lines at the end of the Makefile:
auto_direct: auto_direct.time auto_home: auto_home.time
Add an entry for auto_direct.time in the middle of the file.
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 same procedure should be followed for all other automounter maps, such as auto_home, or any other nondefault 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.
Delete the name of the database from the all rule.
Delete or comment out the database rule for the database you want to delete.
Remove the time rule.
For example, to delete the hosts database, the hosts: hosts.time entry should be removed.
Remove the map from the master and slave servers.