1167465Smp#!/bin/sh 259243Sobrien# 359243Sobrien# This script is invoked by rpc.ypupdatedd to propagate NIS maps 459243Sobrien# after the master map databases have been modified. It expects 559243Sobrien# to be passed two arguments: the name of the map that was updated 659243Sobrien# and the name of the domain where the map resides. 759243Sobrien# These are passed to /var/yp/Makefile. 859243Sobrien# 959243Sobrien# Comment out the LOG=yes line to disable logging. 1059243Sobrien# 1159243Sobrien# $FreeBSD$ 1259243Sobrien# 1359243Sobrien 1459243SobrienLOG=yes 1559243SobrienLOGFILE=/var/yp/ypupdate.log 1659243Sobrien 17100616Smpumask 077 1859243Sobrien 1959243Sobrienif [ ! -f $LOGFILE ]; 2059243Sobrienthen 2159243Sobrien /usr/bin/touch $LOGFILE 2259243Sobrien echo "# Edit /usr/libexec/yppwupdate to disable" >> $LOGFILE 2359243Sobrien echo "# logging to this file from yppasswdd." >> $LOGFILE 2459243Sobrien echo -n "# Log started on: " >> $LOGFILE 2559243Sobrien /bin/date >> $LOGFILE 2659243Sobrienfi 2759243Sobrien 2859243Sobrienif [ ! $LOG ]; 2959243Sobrienthen 3059243Sobrien cd /var/yp/$2; /usr/bin/make -f ../Makefile $1 2>&1 3159243Sobrienelse 3259243Sobrien cd /var/yp/$2; /usr/bin/make -f ../Makefile $1 >> $LOGFILE 3359243Sobrienfi 3459243Sobrien