ispman/bin ispman.ldifupdate,1.3,1.4
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-serv29294/bin
Modified Files:
ispman.ldifupdate
Log Message:
perltidy
Index: ispman.ldifupdate
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman.ldifupdate,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ispman.ldifupdate 26 May 2006 21:47:35 -0000 1.3
+++ ispman.ldifupdate 26 May 2006 22:51:25 -0000 1.4
@@ -295,12 +295,13 @@
}
my $resellerName = $reseller->get_value("ispmanresellername");
if ($resellerName) {
- if ($entry->get_value("ispmanResellerName")){
- $msg .= "replacing ispmanResellerName: $resellerName\n";
- $entry->replace( "ispmanResellerName", $resellerName );
- } else {
- $msg .= "adding ispmanResellerName: $resellerName\n";
- $entry->add( "ispmanResellerName", $resellerName );
+ if ( $entry->get_value("ispmanResellerName") ) {
+ $msg .= "replacing ispmanResellerName: $resellerName\n";
+ $entry->replace( "ispmanResellerName", $resellerName );
+ }
+ else {
+ $msg .= "adding ispmanResellerName: $resellerName\n";
+ $entry->add( "ispmanResellerName", $resellerName );
}
}
else {
@@ -580,7 +581,7 @@
my %opts;
getopt( 'ho', \%opts );
-if ( exists($opts{'h'}) or !defined($opts{'o'})) {
+if ( exists( $opts{'h'} ) or !defined( $opts{'o'} ) ) {
usage();
exit;
}
@@ -594,7 +595,6 @@
# create output file
$OUT = Net::LDAP::LDIF->new( $opts{'o'}, "w", 'change' => 1 );
-
### DEFAULTS ###
print STDERR "Getting defaults ...\n";
@@ -620,7 +620,6 @@
print STDERR "default_domainShell = "
. $ispman->{'Config'}{'default_domainShell'} . "\n";
-
### CHECKS ###
# checking objectclasses
@@ -688,23 +687,23 @@
}
}
-
### UPDATE ###
# try to fetch install ldif and look for new/changed entries
-my $install_ldif = "cat $ispman->{'Config'}{'installDir'}/conf/ldif/ispman.ldif|".
- "$ispman->{'Config'}{'installDir'}/bin/ispman.substConf|";
+my $install_ldif =
+ "cat $ispman->{'Config'}{'installDir'}/conf/ldif/ispman.ldif|"
+ . "$ispman->{'Config'}{'installDir'}/bin/ispman.substConf|";
-my $ldif=Net::LDAP::LDIF->new( $install_ldif );
+my $ldif = Net::LDAP::LDIF->new($install_ldif);
print STDERR "WARNING: Can't open $install_ldif" unless $ldif;
print STDERR "\nChecking for missing ISPMan entries ...\n";
-$msg="";
+$msg = "";
while ( not $ldif->eof() ) {
- my $entry=$ldif->read_entry();
- if (! $ispman->branchExists($entry->dn)) {
- $msg .= "adding missing entry ".$entry->dn;
- commit( $entry,$msg);
+ my $entry = $ldif->read_entry();
+ if ( !$ispman->branchExists( $entry->dn ) ) {
+ $msg .= "adding missing entry " . $entry->dn;
+ commit( $entry, $msg );
}
}
-------------------------------------------------------
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