#!/usr/bin/perl

# nisYPMake
# This script is called to update the NIS databases
# and to push them out to NIS slave servers.

# Set the $ypmake variable to the name of the program you 
# use to rebuild the NIS databases e.g.  If the command 
# was /var/yp/make, then use $ypmake = "/var/yp/make" ;
$ypmake = "/var/yp/make" ;

# NOTE:  If you modify this code, you MUST change the version to
#        something over 100 to prevent it being replaced by future
#        versions of this script. 
$version = 0.18 ;

($data) = @ARGV ;

# Output the version if requested
if($data eq "-v") {
    print "$version\n" ;
    exit(0) ;
}

# We want to see the output as it is happening, so use line buffering
select(stdout) ;$| = 1 ; select(stdout) ;

# Run the command
print "Calling nisYPMake\n" ;

`$ypmake` ;
