#!/usr/bin/perl
#
#  Import LDIF file to LDAP database
#  by pfalcon@users.sourceforge.net 2000-10-18
#  $Id: ldap-import,v 1.3 2000/10/20 01:26:26 pfalcon Exp $
#

use DBI;

require("include.pl");  # Include all the predefined functions
&db_connect;		# Parsing config in db_connect is bogus!

if (!($#ARGV+1)) {
	print "Usage: $0 <ldif_file>\n";
	exit;
}

$cmd = "${ldap_prefix}ldapadd -D '$sys_ldap_admin_dn' -W -f $ARGV[0]";
#print "$cmd\n";
system($cmd);
