#!/bin/sh
# Some constants:
NET="/usr/sbin"

# Setting up NIS:
# (NOTE: For detailed information about setting up NIS, see the documentation
# in /usr/doc/yp-tools, /usr/doc/ypbind, and /usr/doc/ypserv)
#
# First, we must set the NIS domainname.  NOTE: this is not
# necessarily the same as your DNS domainname, set in 
# /etc/resolv.conf!  The NIS domainname is the name of a domain
# served by your NIS server.

if [ -r /etc/defaultdomain ]; then
   nisdomainname `cat /etc/defaultdomain`
fi

# Then, we start up ypbind.  It will use broadcast to find a server.

if [ -d /var/yp ] ; then
   echo -n " ypbind"
   ${NET}/ypbind 
fi

# If you are the NIS master server for the NIS domain, then
# you must run rpc.yppasswdd, which is the RPC server that 
# lets users change their passwords.

if [ -x ${NET}/rpc.yppasswdd ]; then
  echo -n " yppasswdd"
   ${NET}/rpc.yppasswdd
fi 

