ispman/bin ispman.ldifload,1.6,1.7
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/bin
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv27858/bin
Modified Files:
ispman.ldifload
Log Message:
removed forcefully set of changetype (unable to import modify-LDIF)
fixed error output
Index: ispman.ldifload
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman.ldifload,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ispman.ldifload 10 Oct 2004 13:21:08 -0000 1.6
+++ ispman.ldifload 26 May 2006 22:48:14 -0000 1.7
@@ -52,27 +52,26 @@
print "Error lines:\n", $ldif->error_lines(), "\n";
}
else {
- # try to add entry to LDAP
- $entry->changetype("add");
- print "adding ".$entry->dn();
- my $result=$entry->update($ISPMan::LDAP::LDAP);
+ print $entry->changetype . "\t" . $entry->dn();
+
+ my $result = $entry->update($ISPMan::LDAP::LDAP);
if ( $result->code == 0 ) {
+
# add succeeded
print "... ok!\n";
}
elsif ( $result->code == 68 ) {
+
# entry already exists
print "... already exists, skipping.\n";
}
else {
+
# other error
- print "... failed with error ".$result."\n";
+ print "... failed with error: " . $result->error . "\n";
}
}
}
$ldif->done();
__END__
-
-
-
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642