error 13 "The directory %s does not exist.\nNIS configuration has not completed properly.\nPlease read the NIS Administrator's Guide and \nreconfigure NIS for this system." $yproot_dir/binding
cleanup
exit 1
fi
if [ ! -d $binding_dir ]
then
if [ "$HOW_INSTALL" = "NORMAL" ]
then
menu -c
error 13 "The directory %s does not exist.\nNIS configuration has not completed properly.\nPlease read the NIS Administrator's Guide and \nreconfigure NIS for this system." $binding_dir
cleanup
exit 1
else
mkdir -p $binding_dir
fi
fi
if [ -f $hf ]
then
cp $hf $binding_file
fi
if [ -x /sbin/chlvl ]
then
chlvl SYS_PUBLIC $binding_file
fi
#
##
## If client only, we are done
## our purpose was just to set up the binding file
##
if [ $clientp = T ]
then
set_initd_nis $NIS_DOMAIN 0 0
if [ "$HOW_INSTALL" = "NORMAL" ]
then
menu -c
fi
if [ $errors_in_setup = T ]
then
lecho 14 "\n \n%s has been set up as a NIS client with errors. \
Please read /tmp/nis.config for further information, and re-run ypinit.\n \n" $host
else
lecho 8 "\n \n%s has been successfully set up as a NIS client. \
\n \n" $host
fi
cleanup
exit 0
fi
for dir in $yproot_dir/$NIS_DOMAIN
do
if [ -d $dir ]
then
rm -rf $dir
fi
mkdir $dir 2>/tmp/nis.config
if [ $? -ne 0 ]
then
if [ "$HOW_INSTALL" = "NORMAL" ]
then
menu -c
fi
error 6 "Can not make new directory %s \n" $dir
cleanup
exit 1
fi
done
if [ $slavep = T ]
then
set_initd_nis $NIS_DOMAIN 1 0
echo "master=$master" > $yproot_dir/xfrmaps
echo "maps=\"$maps\"" >> $yproot_dir/xfrmaps
if [ "$HOW_INSTALL" = "NORMAL" ]
then
menu -c
fi
if [ $errors_in_setup = T ]
then
lecho 15 "\n \n%s has been set up as a NIS slave server\
with errors. \
Please read /tmp/nis.config for further information, and re-run ypinit.\n \n" $host
else
lecho 9 "\n \n%s has been successfully set up as a NIS slave server. \