summaryrefslogtreecommitdiffstats
path: root/ldap/admin/src/scripts/dscreate.map.in
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2007-07-13 18:35:33 +0000
committerRich Megginson <rmeggins@redhat.com>2007-07-13 18:35:33 +0000
commitcd0220f611d38f47c6414a3a976c85800eddce52 (patch)
treee82b94785469c6dfbb269fdb4a4d05c8a04ea7bc /ldap/admin/src/scripts/dscreate.map.in
parent44ee32bb2f39712b8c0f5628d5c17109c48772d7 (diff)
downloadds-cd0220f611d38f47c6414a3a976c85800eddce52.tar.gz
ds-cd0220f611d38f47c6414a3a976c85800eddce52.tar.xz
ds-cd0220f611d38f47c6414a3a976c85800eddce52.zip
Resolves: bug 248145
Bug Description: Replace ds_newinst binary with perl script Reviewed by: nhosoi (Thanks!) Fix Description: The time has come. We can finally get rid of the instance creation C code once and for all. I've created a DSCreate module that has all of the functionality of the old create_instance.c code, along with a few items from ldap/admin/lib. The way it works is this: it first creates the dse.ldif file using template-dse.ldif and the suffix-db template to create the initial db and suffix. It then adds additional optional configuration depending on what optional features have been enabled. It creates other config files and copies in the schema. It then initializes the database. It uses a template file based on the type of entry implied by the suffix, then adds the default ACIs. If the user chose to do so, it will also create the ou=people, ou=groups, etc. entries. The user can also supply an LDIF file which will be used to populate the initial database, in which case none of the default entries or ACIs will be used. It then starts the server (if desired). I had to create a function makePaths that works like mkdir -p except that it will chown, chgrp, and chmod all paths created. I had to change the other places where instance creation was called to use the new calling semantics. ds_create changed quite a bit, since it can just use an Inf to pass in the information instead of calling ds_newinst as a CGI program. I had to change FileConn to add support for namingContexts (i.e. entries with no parent), and to have it write each change each time, and to return copies of entries when searching, to avoid modifying the tree in place. This makes it act much more like LDAP. I found and fixed a few bugs in Migration along the way that were revealed while integrating the new DSCreate code. Platforms tested: RHEL4, FC6 Flag Day: Yes. New instance creation code and autotool changes. Doc impact: no
Diffstat (limited to 'ldap/admin/src/scripts/dscreate.map.in')
-rw-r--r--ldap/admin/src/scripts/dscreate.map.in67
1 files changed, 67 insertions, 0 deletions
diff --git a/ldap/admin/src/scripts/dscreate.map.in b/ldap/admin/src/scripts/dscreate.map.in
new file mode 100644
index 00000000..a475416a
--- /dev/null
+++ b/ldap/admin/src/scripts/dscreate.map.in
@@ -0,0 +1,67 @@
+# BEGIN COPYRIGHT BLOCK
+# This Program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation; version 2 of the License.
+#
+# This Program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA.
+#
+# In addition, as a special exception, Red Hat, Inc. gives You the additional
+# right to link the code of this Program with code not covered under the GNU
+# General Public License ("Non-GPL Code") and to distribute linked combinations
+# including the two, subject to the limitations in this paragraph. Non-GPL Code
+# permitted under this exception must only link to the code of this Program
+# through those well defined interfaces identified in the file named EXCEPTION
+# found in the source code files (the "Approved Interfaces"). The files of
+# Non-GPL Code may instantiate templates or use macros or inline functions from
+# the Approved Interfaces without causing the resulting work to be covered by
+# the GNU General Public License. Only Red Hat, Inc. may make changes or
+# additions to the list of Approved Interfaces. You must obey the GNU General
+# Public License in all respects for all of the Program code and other code used
+# in conjunction with the Program except the Non-GPL Code covered by this
+# exception. If you modify this file, you may extend this exception to your
+# version of the file, but you are not obligated to do so. If you do not wish to
+# provide this exception without modification, you must delete this exception
+# statement from your version and license this file solely under the GPL without
+# exception.
+#
+#
+# Copyright (C) 2007 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+#
+# [Parameter resolution rules]
+# * If the right-hand value is in ` (backquote), the value is eval'ed by perl.
+# The output should be stored in $returnvalue to pass to the internal hash.
+# * 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).
+# * 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%)
+# which refers the right-hand value (key) of this map file.
+#
+fqdn = FullMachineName
+dsid = ServerIdentifier
+ds_user = SuiteSpotUserID
+ds_port = ServerPort
+rootdn = RootDN
+ds_suffix = Suffix
+ds_bename = ds_bename
+ds_passwd = HashedRootDNPwd
+
+schema_dir = schema_dir
+lock_dir = lock_dir
+tmp_dir = tmp_dir
+cert_dir = cert_dir
+ldif_dir = ldif_dir
+bak_dir = bak_dir
+inst_dir = inst_dir
+log_dir = log_dir
+config_dir = config_dir
+db_dir = db_dir