freebsd-skq/usr.sbin/rpc.yppasswdd/yppwupdate
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00

35 lines
875 B
Bash

#!/bin/sh
#
# This script is invoked by rpc.yppasswdd to update the password
# maps after the master password file has been modified. It expects
# to be passed two arguments: the name of the master.passwd template
# file that was modified by the server, and the name of the domain to
# update. These are passed to /var/yp/Makefile.
#
# Comment out the LOG=yes line to disable logging.
#
# $FreeBSD$
#
PATH=/bin:/usr/bin; export PATH
LOG=yes
LOGFILE=/var/yp/ypupdate.log
umask 077
if [ ! -f $LOGFILE ];
then
touch $LOGFILE
echo "# Edit /usr/libexec/yppwupdate to disable" >> $LOGFILE
echo "# logging to this file from yppasswdd." >> $LOGFILE
echo -n "# Log started on: " >> $LOGFILE
date >> $LOGFILE
fi
if [ ! $LOG ];
then
cd /var/yp && make MASTER_PASSWD=$1 UPDATE_DOMAIN=$2 $3 2>&1
else
cd /var/yp && make MASTER_PASSWD=$1 UPDATE_DOMAIN=$2 $3 >> $LOGFILE 2>&1
fi