yppwupdate revision 50479
1197139Shrs#!/bin/sh 2197139Shrs# 3197139Shrs# This script is invoked by rpc.yppasswdd to update the password 4197139Shrs# maps after the master password file has been modified. It expects 5197139Shrs# to be passed two arguments: the name of the master.passwd template 6198190Sdougb# file that was modified by the server, and the name of the domain to 7197139Shrs# update. These are passed to /var/yp/Makefile. 8197139Shrs# 9197139Shrs# Comment out the LOG=yes line to disable logging. 10197139Shrs# 11197139Shrs# $FreeBSD: head/usr.sbin/rpc.yppasswdd/yppwupdate 50479 1999-08-28 01:35:59Z peter $ 12197139Shrs# 13197139Shrs 14197139ShrsPATH=/bin:/usr/bin; export PATH 15197139ShrsLOG=yes 16197139ShrsLOGFILE=/var/yp/ypupdate.log 17197139Shrs 18197139Shrsumask 077 19197139Shrs 20197139Shrsif [ ! -f $LOGFILE ]; 21197139Shrsthen 22197139Shrs touch $LOGFILE 23197139Shrs echo "# Edit /usr/libexec/yppwupdate to disable" >> $LOGFILE 24220153Semaste echo "# logging to this file from yppasswdd." >> $LOGFILE 25197139Shrs echo -n "# Log started on: " >> $LOGFILE 26197139Shrs date >> $LOGFILE 27197139Shrsfi 28197139Shrs 29197139Shrsif [ ! $LOG ]; 30197139Shrsthen 31197139Shrs cd /var/yp && make MASTER_PASSWD=$1 UPDATE_DOMAIN=$2 $3 2>&1 32197139Shrselse 33197139Shrs cd /var/yp && make MASTER_PASSWD=$1 UPDATE_DOMAIN=$2 $3 >> $LOGFILE 2>&1 34197139Shrsfi 35197139Shrs