YP auto.master
X200SCL0 at TWNITRI1.BITNET
X200SCL0 at TWNITRI1.BITNET
Wed Jul 18 13:16:00 AEST 1990
> rbd at lamont.ldgo.columbia.edu (roger davis) writes:
> Has anyone else ever used a YP auto.master map successfully? Since it's
> not well-documented and Sun supplies no YP Makefile entry for such a
> thing, I suspect that there may not be many people out there doing this.
Yes, I've managed to successfully build a YP auto.master map. We used it
for about 3 months, and it seems to work smoothly so far. Our YP clients
don't hang indefinitely at login time, though sometime they did hang 1 or
2 minutes (rarely happened).
There are two automount data base files, auto.master and auto.w100, in our
configuration. The difference between our configuration and yours is that
we use inderect map instead of direct map.
# auto.master
#
# DIRECTORY MAP MOUNT OPTIONS
/net -hosts -intr
/w100 /etc/auto.w100 -intr
# auto.w100 (partial listing)
#
ssh x2mips1:/usr/src/srcdsk1/export/x2sun3/ssh
dragon x2mips1:/usr/src/srcdsk1/export/x2sun3/dragon
hw x2mips1:/usr/src/srcdsk1/export/x2sun3/hw
tcf x2mips1:/usr/src/srcdsk1/export/x2sun3/tcf
jjp x2mips1:/usr/src/srcdsk1/export/x2sun3/jjp
duh x2mips1:/usr/src/srcdsk1/export/x2sun3/duh
mjchan x1sun5:/home/x1sun5/sen/mjchan
ren x1sun5:/home/x1sun5/sen/ren
liao x1sun5:/home/x1sun5/sen/liao
lan x1sun5:/home/x1sun5/sen/lan
scl x1sun8:/home/x1sun8/sen/scl
rongmou x1sun5:/home/x1sun5/sen/rongmou
yyf x1sun5:/home/x1sun5/sen/yyf
chijohn x1sun5:/home/x1sun5/sen/chijohn
crc x1sun2:/home/x1sun2/guest/crc
simon x1sun2:/home/x1sun2/guest/simon
joe x4suna:/home/joe
wsj x1sun5:/home/x1sun5/sen/wsj
The following is my makefile for making YP automounter database. It's
modified from the YP makefile of one Sun 386i machine.
# Makefile for making YP auto.master
# auto.w100
#
DIR =/etc
DOM = `domainname`
NOPUSH = ""
YPDIR=/usr/etc/yp
YPDBDIR=/var/yp
YPPUSH=$(YPDIR)/yppush
MAKEDBM=$(YPDIR)/makedbm
ALL_TARGETS = \
auto.master \
auto.w100
all: $(ALL_TARGETS)
auto.master: auto.master.time
auto.w100: auto.w100.time
auto.master.time: $(DIR)/auto.master
auto.w100.time: $(DIR)/auto.w100
auto.master.time \
auto.w100.time:
- at if [ -f $(DIR)/$(@:.time=) ]; then \
sed -e '/^[ ]*#/d' $(DIR)/$(@:.time=) \
| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/$(@:.time=); \
touch $@; \
echo "updated $(@:.time=)"; \
if [ ! $(NOPUSH) ]; then \
$(YPPUSH) $(@:.time=); \
echo "pushed $(@:.time=)"; \
else \
: ; \
fi \
else \
echo "couldn't find $(DIR)/$(@:.time=)"; \
fi
Our starting procedure of automounter at YP server and YP client are
different.
# at YP server
#
if [ -f /usr/etc/automount ]; then
automount -f /etc/auto.master& (echo -n ' automount') >/dev/console
fi
# at YP client
#
if [ -f /usr/etc/automount ]; then
automount & (echo -n ' automount') >/dev/console
fi
The above is our automount configuration, hope it will give you some help.
Though our automounter runs smoothly, I have another question about YP
automount database. I have made both auto.master and auto.w100 into YP
database, but our YP clients can't access YP auto.w100, they can only use
YP auto.master. So I had to copy auto.w100 into all machines, either YP
server or YP clients should contain a local /etc/auto.w100 file to keep
our YP automounter running correctly. According to Sun's manual page, I
had tried to modify auto.master file as follows:
# auto.master
#
# DIRECTORY MAP MOUNT OPTIONS
/net -hosts -intr
/w100 +auto.w100 -intr
But it still doesn't work. Could someone out there tell me how to make
automount database so that I can save much of SA work of making copies of
auto.w100, auto.w200, ...
Thanks in advance.
PS. I agree with davis that Sun's automounter manual is not well written.
We need more examples about how to use automounter on YP.
Chun-liang Shen < x200scl0 at twnitri1.bitnet >
More information about the Comp.sys.sun
mailing list