freebsd-skq/usr.sbin/rpc.ypupdated/ypupdate
wpaul 93c9d6f0d2 This commit was generated by cvs2svn to compensate for changes in r26236,
which included commits to RCS files with non-trunk default branches.
1997-05-28 15:47:10 +00:00

34 lines
846 B
Bash
Executable File

#!/bin/sh
#
# This script is invoked by rpc.ypupdatedd to propagate NIS maps
# after the master map databases have been modified. It expects
# to be passed two arguments: the name of the map that was updated
# and the name of the domain where the map resides.
# These are passed to /var/yp/Makefile.
#
# Comment out the LOG=yes line to disable logging.
#
# $Id: yppwupdate,v 1.3 1996/06/05 06:13:09 wpaul Exp $
#
LOG=yes
LOGFILE=/var/yp/ypupdate.log
umask 077
if [ ! -f $LOGFILE ];
then
/usr/bin/touch $LOGFILE
echo "# Edit /usr/libexec/yppwupdate to disable" >> $LOGFILE
echo "# logging to this file from yppasswdd." >> $LOGFILE
echo -n "# Log started on: " >> $LOGFILE
/bin/date >> $LOGFILE
fi
if [ ! $LOG ];
then
cd /var/yp/$2; /usr/bin/make -f ../Makefile $1 2>&1
else
cd /var/yp/$2; /usr/bin/make -f ../Makefile $1 >> $LOGFILE
fi