#! /bin/sh
#
# ypxfr_2perday    Transfer all NIS maps from the master
#                  in case we missed an update.
#                  (Or if we don't get automatic updates).
#
# Version:         @(#)ypxfr_2perday.sh  1.10  miquels@cistron.nl
#


YPBINDIR=/usr/lib/yp

ALL_MAPS=$(${YPBINDIR}/yphelper --maps $(/usr/bin/ypwhich))
MAPS="hosts.byaddr hosts.byname netgroup netgroup.byhost netgroup.byuser \
	networks.byname networks.byaddr"

for map in $MAPS
do
  if echo $ALL_MAPS | grep $map > /dev/null ; then
    [ -t 1 ] && echo "$YPBINDIR/ypxfr $map"
    $YPBINDIR/ypxfr $map
  fi
done

