Author: nhosoi
Update of /cvs/dirsec/adminserver/admserv/newinst/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8193/admserv/newinst/src
Modified Files:
AdminUtil.pm.in adminserver.map.in configdsroot.map.in
dirserver.map.in register_param.map.in
Log Message:
Resolves: #247215
Summary: Reimplement ds_remove without setuputil code (comment #7)
Description: adding Perl version of ds_remove
Index: AdminUtil.pm.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminUtil.pm.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- AdminUtil.pm.in 4 Jul 2007 01:31:33 -0000 1.8
+++ AdminUtil.pm.in 11 Jul 2007 01:20:21 -0000 1.9
@@ -42,11 +42,13 @@
@EXPORT = qw(getAdmConf getConfigDSConn createConfigDS createSubDS
updateAdmConf updateAdmpw updateLocalConf importCACert
getLocalConfigDS getPset registerDSWithConfigDS
- registerManyDSWithConfigDS createSubDSNoConn);
+ registerManyDSWithConfigDS createSubDSNoConn
+ unregisterDSWithConfigDS);
@EXPORT_OK = qw(getAdmConf getConfigDSConn createConfigDS createSubDS
updateAdmConf updateAdmpw updateLocalConf importCACert
getLocalConfigDS getPset registerDSWithConfigDS
- registerManyDSWithConfigDS createSubDSNoConn);
+ registerManyDSWithConfigDS createSubDSNoConn
+ unregisterDSWithConfigDS);
# load perldap
use Mozilla::LDAP::Conn;
@@ -633,6 +635,32 @@
my $conn = shift;
my $admConf = shift;
my $configdir = shift || "@instconfigdir@";
+
+ my $rc = registerDSWithConfigDSExt(1, $servid, $errs, $inf,
+ $conn, $admConf, $configdir);
+ return $rc;
+}
+
+sub unregisterDSWithConfigDS {
+ my $servid = shift;
+ my $errs = shift;
+ my $inf = shift;
+ my $conn = shift;
+ my $admConf = shift;
+ my $configdir = shift || "@instconfigdir@";
+ my $rc = registerDSWithConfigDSExt(0, $servid, $errs, $inf,
+ $conn, $admConf, $configdir);
+ return $rc;
+}
+
+sub registerDSWithConfigDSExt {
+ my $isRegister = shift;
+ my $servid = shift;
+ my $errs = shift;
+ my $inf = shift;
+ my $conn = shift;
+ my $admConf = shift;
+ my $configdir = shift || "@instconfigdir@";
my $inst;
my $needclose;
@@ -682,10 +710,19 @@
}
}
- # add the Admin Server configuration entries
- my @ldiffiles = ("@ldifdir(a)/10dsdata.ldif.tmpl",
- "@ldifdir(a)/11dstasks.ldif.tmpl"
+ my @ldiffiles = ();
+ if ($isRegister)
+ {
+ # add the Admin Server configuration entries
+ @ldiffiles = ("@ldifdir(a)/10dsdata.ldif.tmpl",
+ "@ldifdir(a)/11dstasks.ldif.tmpl"
);
+ }
+ else
+ {
+ # remove the Admin Server configuration entries
+ @ldiffiles = ("@ldifdir(a)/10rm_dsdata.ldif.tmpl");
+ }
my $setupinf = new Inf("@infdir(a)/setup.inf");
my $slapdinf = new Inf("@infdir(a)/slapd.inf");
@@ -708,4 +745,3 @@
return @{$errs} ? 0 : 1;
}
-
Index: adminserver.map.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/adminserver.map.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- adminserver.map.in 6 Jul 2007 18:06:19 -0000 1.5
+++ adminserver.map.in 11 Jul 2007 01:20:21 -0000 1.6
@@ -48,6 +48,9 @@
# * If the right-hand value is in " (doublequote), the value is passed as is.
# * If the right-hand value is not in any quote, the value should be found
# in either of the setup inf file (static) or the install inf file (dynamic).
+# * The right-hand value could have the format Key:"default_value".
+# In this case, Key is searched in the inf files first.
+# If the Key is not found, the default_value is set.
# * Variables surrounded by @ (e.g., @configdir@) are replaced with the
# system path at the compile time.
# * The right-hand value can contain variables surrounded by % (e.g., %asid%)
Index: configdsroot.map.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/configdsroot.map.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- configdsroot.map.in 25 Jun 2007 18:23:53 -0000 1.4
+++ configdsroot.map.in 11 Jul 2007 01:20:21 -0000 1.5
@@ -45,6 +45,9 @@
# * If the right-hand value is in " (doublequote), the value is passed as is.
# * If the right-hand value is not in any quote, the value should be found
# in either of the setup inf file (static) or the install inf file (dynamic).
+# * The right-hand value could have the format Key:"default_value".
+# In this case, Key is searched in the inf files first.
+# If the Key is not found, the default_value is set.
# * Variables surrounded by @ (e.g., @configdir@) are replaced with the
# system path at the compile time.
# * The right-hand value can contain variables surrounded by % (e.g., %asid%)
@@ -66,7 +69,7 @@
ds_version = Version
ds_baseversion = BaseVersion
ds_port = ServerPort
-ds_secure_port = "636"
+ds_secure_port = SecureServerPort:"636"
ds_suffix = Suffix
dsid = ServerIdentifier
Index: dirserver.map.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/dirserver.map.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- dirserver.map.in 28 Jun 2007 16:24:41 -0000 1.5
+++ dirserver.map.in 11 Jul 2007 01:20:21 -0000 1.6
@@ -48,6 +48,9 @@
# * If the right-hand value is in " (doublequote), the value is passed as is.
# * If the right-hand value is not in any quote, the value should be found
# in either of the setup inf file (static) or the install inf file (dynamic).
+# * The right-hand value could have the format Key:"default_value".
+# In this case, Key is searched in the inf files first.
+# If the Key is not found, the default_value is set.
# * Variables surrounded by @ (e.g., @configdir@) are replaced with the
# system path at the compile time.
# * The right-hand value can contain variables surrounded by % (e.g., %asid%)
@@ -67,7 +70,7 @@
dsid = ServerIdentifier
ds_user = SuiteSpotUserID
ds_port = ServerPort
-ds_secure_port = "636"
+ds_secure_port = SecureServerPort:"636"
rootdn = RootDN
ds_suffix = Suffix
ds_buildnum = BuildNumber
Index: register_param.map.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/register_param.map.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- register_param.map.in 6 Jul 2007 18:06:19 -0000 1.6
+++ register_param.map.in 11 Jul 2007 01:20:21 -0000 1.7
@@ -48,6 +48,9 @@
# * If the right-hand value is in " (doublequote), the value is passed as is.
# * If the right-hand value is not in any quote, the value should be found
# in either of the setup inf file (static) or the install inf file (dynamic).
+# * The right-hand value could have the format Key:"default_value".
+# In this case, Key is searched in the inf files first.
+# If the Key is not found, the default_value is set.
# * Variables surrounded by @ (e.g., @configdir@) are replaced with the
# system path at the compile time.
# * The right-hand value can contain variables surrounded by % (e.g., %asid%)
@@ -84,7 +87,7 @@
dsid = ServerIdentifier
ds_user = SuiteSpotUserID
ds_port = ServerPort
-ds_secure_port = "636"
+ds_secure_port = SecureServerPort:"636"
rootdn = RootDN
ds_suffix = Suffix
ds_buildnum = BuildNumber