NFS Services Administrator's Guide

Configuring and Administering NIS
Configuring and Administering an NIS Master Server
Chapter 4 167
To Remove an Automounter Map from Your NIS
Domain
1. Log in as root to the NIS master server.
2. In the /usr/sbin/ypinit script, use a text editor to remove the map
name from the MASTER_MAPS list.
3. In the /var/yp/Makefile file, remove the map from the list of maps
that begins with all:.
4. In the /var/yp/Makefile file, remove the statement that begins
$(YPDBDIR)/$(DOM)/auto_mapname.time. For example, if you were
removing the auto.home map, you would remove the following lines:
$ (YPDBDIR)/$(DOM)/auto_home.time: $(DIR)/auto_home
@(sed -e ”s/ˆ[ | ]*//g” -e ”/ˆ#/d” -e s/#.*$$// <
$(DIR)/auto_home $(CHKPIPE)) |
$(MAKEDBM) - $(YPDBDIR) /$(DOM)/auto.home;
@touch $(YPDBDIR)/$(DOM)/auto_home.time;
@echoupdated auto.home”;
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM)
auto.home; fi
@if [ ! $(NOPUSH) ]; then echo ”pushed auto.home”;
fi
5. In the /var/yp/Makefile file, remove the statement that begins
auto.mapname:. For example, if you were removing the auto.home
map, you would remove the following lines:
auto.home:
@if [ $(NOPUSH) ]; then $(MAKE) $(MFLAGS) -k \
$(YPDBDIR)/$(DOM)/auto_home.time DOM=$(DOM)
DIR=$(DIR); \
else $(MAKE) $(MFLAGS) -k
$(YPDBDIR)/$(DOM)/auto_home.time \
DOM=$(DOM) DIR=$(DIR) NOPUSH=$(NOPUSH);fi
6. On the master and on each of the slave servers, remove the map files,
mapname.dir and mapname.pag from the directory where your maps
are stored. The directory is called /var/yp/domainname, where
domainname is the name of your NIS domain. For example, if you
were removing the auto.home map from the Finance domain, you
would issue the following commands on the master server and on
each of the slave servers:
cd /var/yp/Finance
rm auto.home.dir auto.home.pag