Blog

— /var/yp/GNUmakefile.2005-08-25 Thu Aug 25 13:18:31 2005 +++ /var/yp/GNUmakefile Thu Aug 25 14:30:04 2005 @@ -76,6 +76,7 @@ AUTONT=auto_nt AUTOALT=auto_alt AUTODIRECT=auto_direct +AUTOAPPS=auto_apps else AUTOMASTER=auto.master AUTOHOME=auto.home @@ -83,6 +84,7 @@ AUTONT=auto.nt AUTOALT=auto.alt AUTODIRECT=auto.direct +AUTOAPPS=auto.apps endif GNUGREP=/usr/local/bin/ggrep MALIASES=$(YPDBDIR)/$(DOM)/mail.aliases @@ -96,7 +98,7 @@

all:: passwd group hosts ethers networks rpc services protocols
netgroup bootparams aliases publickey netid netmasks c2secure \

  •   timezone auto.master auto.home auto.soft auto.nt auto.alt auto.direct \
    
  •   timezone auto.master auto.home auto.soft auto.nt auto.alt auto.apps auto.direct \
      printcap dmmo printers.conf virtualip
    

diams: dmmo_applis dmmo_sites dmmo_users ypservers @@ -424,6 +426,22 @@ echo "couldn’t find $(DIR)/auto.alt";
fi

+auto.apps.time: $(DIR)/$(AUTOAPPS)

  •   -@if [ -f $(DIR)/$(AUTOAPPS) ]; then \
    
  •           sed -e "/^#/d" -e s/#.*$$// $(DIR)/$(AUTOAPPS) \
    
  •           | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/auto.apps; \
    
  •           touch auto.apps.time; \
    
  •           echo "updated auto.apps"; \
    
  •           if [ ! $(NOPUSH) ]; then \
    
  •                   $(YPPUSH) auto.apps; \
    
  •                   echo "pushed auto.apps"; \
    
  •           else \
    
  •           : ; \
    
  •           fi \
    
  •   else \
    
  •           echo "couldn't find $(DIR)/auto.apps"; \
    
  •   fi
    

printcap.time: $(DIR)/ypprintcap -@if [ -f $(DIR)/yp$(@:.time=) ]; then
sed < $(DIR)/yp$(@:.time=)
@@ -686,6 +704,7 @@ auto.soft: auto.soft.time auto.nt: auto.nt.time auto.alt: auto.alt.time +auto.apps: auto.apps.time auto.direct: auto.direct.time printcap: printcap.time printers.conf: printers.conf.time @@ -710,6 +729,7 @@ $(DIR)/$(AUTOSOFT): $(DIR)/$(AUTONT): $(DIR)/$(AUTOALT): +$(DIR)/$(AUTOAPPS): $(DIR)/$(AUTODIRECT): $(DIR)/ypprintcap: $(DIR)/printers.conf:

  1. soul is the hostname of the master NIS server for a given domain
  2. kitchen is the hostname of the slave NIS server for a given domain
  3. bento is the hostname of the NFS server
  4. nfs is an alias (CNAME) for the NFS server

NFS configuration, logged on bento

Just add the wanted share in the export list on server bento. On Sun Solaris, it is done as follow:

# cat << EOF >> /etc/dfs/dfstab
share -F nfs -o rw -d "Applications repository, NFS shared" /export/bento/apps
EOF

The file system /export/bento/apps must already be available.

Start the nfsd service (and associated daemons: mountd, statd and lockd) if necessary:

# /etc/init.d/nfs.server start

Or simply export the new share:

# shareall

NIS configuration, logged on soul

Because all of the automounted NFS clients (in particular Solaris, AIX and GNU/Linux) know how to use automount maps shared via the NIS protocol, the centralized auto_apps (SYSV style) map resides on the master NIS server, soul.

Since this is a new map to add, there is a little more to do here.

Create the map in the DIR (in NIS parlance) directory:

# touch /etc/ivyp/auto_apps
# ci -i /etc/ivyp/auto_apps
/*
 * Description message: "Automounter map for the applications repository,
 * NFS shared.".
 */
# co -l /etc/yp/auto_apps
# cat << EOF > /etc/ivyp/auto_apps
* -rw,hard,bg,intr nfs:/export/bento/apps/${OSNAME}/${CPU}/${NATISA}/${OSREL}/?
EOF
# ci -u /etc/ivyp/auto_apps

The RCS commands may (and must) be used through the ivv.sh wrapper script.

Teach the customized NIS infrastructure (based on GNU tools, not the native ones) about the new map:

# diff -u /var/yp/GNUmakefile.2005-08-25 /var/yp/GNUmakefile