ispman/scripts ldifupdate,1.14,1.15
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16219/scripts
Modified Files:
ldifupdate
Log Message:
added migration code for ispmanVhostServerAlias
Index: ldifupdate
===================================================================
RCS file: /cvsroot/ispman/ispman/scripts/ldifupdate,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- ldifupdate 6 Jun 2004 09:05:54 -0000 1.14
+++ ldifupdate 6 Jun 2004 09:07:08 -0000 1.15
@@ -333,6 +333,38 @@
$entry->replace( "ispmanVhostExtraConf", $codedconf );
}
+ # checking ispmanVhostServerAlias
+ my @aliases = $entry->get_value("ispmanVhostServerAlias");
+ if (@aliases) {
+
+ # create new alias container
+ my $ou = Net::LDAP::Entry->new;
+ $ou->add(
+ 'objectclass' => 'ispmanBranch',
+ 'ou' => 'vhostAliases'
+ );
+ $ou->dn( "ou=vhostAliases," . $entry->dn() );
+ $ou->changetype("add");
+ $ldif_out->write_entry($ou);
+ $msg .= "creating vhostAlias container...\n";
+
+ # move all aliases to new entries
+ for (@aliases) {
+ my $alias = Net::LDAP::Entry->new;
+ $alias->add(
+ 'objectclass' => 'ispmanVirtualHostAlias',
+ 'ispmanDomain' => $ispmanDomain,
+ 'ispmanVhostName' => $ispmanVhostName,
+ 'ispmanVhostServerAlias' => $_
+ );
+ $alias->dn( "ispmanVhostServerAlias=$_," . $ou->dn() );
+ $alias->changetype("add");
+ $ldif_out->write_entry($alias);
+
+ $entry->delete("ispmanVhostServerAlias");
+ $msg .= "moving vhostAlias \"$_\" to container\n";
+ }
+ }
}
elsif ( $oc{'ispmanDomainUser'} ) {
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504