diff options
Diffstat (limited to 'usr.sbin/rpc.yppasswdd/yppwupdate')
-rw-r--r-- | usr.sbin/rpc.yppasswdd/yppwupdate | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/usr.sbin/rpc.yppasswdd/yppwupdate b/usr.sbin/rpc.yppasswdd/yppwupdate new file mode 100644 index 0000000..7a76880 --- /dev/null +++ b/usr.sbin/rpc.yppasswdd/yppwupdate @@ -0,0 +1,33 @@ +#!/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. +# +# $Id: yppwupdate,v 1.2 1996/02/09 04:21:10 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; /usr/bin/make MASTER_PASSWD=$1 UPDATE_DOMAIN=$2 +else + cd /var/yp; /usr/bin/make MASTER_PASSWD=$1 UPDATE_DOMAIN=$2 >> $LOGFILE +fi |