#! /bin/sh
#
# ypxfr_1perhour   Transfer the group and password files
#                  every hour in case we missed an update.
#                  (Or if we don't get automatic updates).
#
# Version:         @(#)ypxfr_1perhour.sh  1.01  MvS
#

YPBINDIR=/usr/lib/yp

ALL_MAPS=$(${YPBINDIR}/yphelper --maps $(/usr/bin/ypwhich))
MAPS="passwd.byname passwd.byuid shadow.byname group.byname group.bygid"

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

