|
|
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:
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.masterThe order of databases is not relevant, but the white 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 @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.