From 33c5eb37399a8d2d0b170a90a6d4c6fbe1d7211c Mon Sep 17 00:00:00 2001
From: Mark Craig <mark.craig@forgerock.com>
Date: Tue, 10 Mar 2015 10:50:42 +0000
Subject: [PATCH] CR-6241 OPENDJ-1859 Document dsconfig --batch option
---
opendj-server-legacy/src/main/docbkx/release-notes/chap-whats-new.xml | 11 +++++++++++
opendj-server-legacy/src/main/docbkx/admin-guide/chap-admin-tools.xml | 6 ++++++
opendj-server-legacy/src/main/docbkx/install-guide/chap-install-cli.xml | 43 +++++++++++++++++++++++++++++++++++++++++--
3 files changed, 58 insertions(+), 2 deletions(-)
diff --git a/opendj-server-legacy/src/main/docbkx/admin-guide/chap-admin-tools.xml b/opendj-server-legacy/src/main/docbkx/admin-guide/chap-admin-tools.xml
index 7b8d880..0fbe917 100644
--- a/opendj-server-legacy/src/main/docbkx/admin-guide/chap-admin-tools.xml
+++ b/opendj-server-legacy/src/main/docbkx/admin-guide/chap-admin-tools.xml
@@ -291,6 +291,12 @@
useful when you have many <command>dsconfig</command> commands to run
and want to avoid starting the JVM and setting up a new connection for
each command.</para>
+
+ <para>
+ Alternatively, you can read commands from standard input
+ by using the <option>--batch</option> option.
+ </para>
+
<para>In addition to the <link xlink:href="reference#dsconfig-1"
xlink:role="http://docbook.org/xlink/role/olink">dsconfig</link> reference
that covers subcommands, the <link xlink:show="new"
diff --git a/opendj-server-legacy/src/main/docbkx/install-guide/chap-install-cli.xml b/opendj-server-legacy/src/main/docbkx/install-guide/chap-install-cli.xml
index 3ccd5c5..26381d4 100644
--- a/opendj-server-legacy/src/main/docbkx/install-guide/chap-install-cli.xml
+++ b/opendj-server-legacy/src/main/docbkx/install-guide/chap-install-cli.xml
@@ -732,9 +732,48 @@
with <command>dsconfig</command> commands to configure the server.
To run a series of configuration commands as a batch
using the <command>dsconfig</command> command,
- use the <option>--batchFilePath <replaceable>file</replaceable></option> option,
- where <replaceable>file</replaceable> contains the configuration commands.
+ use either
+ the <option>--batchFilePath <replaceable>file</replaceable></option> option,
+ where <replaceable>file</replaceable> contains the configuration commands,
+ or the <option>--batch</option> option to read from standard input
+ as in the following example that creates a backend and sets up indexes.
</para>
+
+ <screen>
+<userinput>/path/to/opendj/bin/dsconfig \
+ --port 4444 \
+ --hostname opendj.example.com \
+ --bindDN "cn=Directory Manager" \
+ --bindPassword password \
+ --no-prompt \
+ --trustAll \
+ --batch <<END_OF_COMMAND_INPUT
+ create-backend --backend-name newBackend \
+ --type persistit \
+ --set base-dn:"dc=example,dc=org" \
+ --set db-cache-percent:20 \
+ --set enabled:true
+ create-backend-index --backend-name newBackend \
+ --type generic \
+ --set index-type:equality \
+ --set index-type:substring \
+ --index-name cn
+ create-backend-index --backend-name newBackend \
+ --type generic \
+ --set index-type:equality \
+ --set index-type:substring \
+ --index-name sn
+ create-backend-index --backend-name newBackend \
+ --type generic \
+ --set index-type:equality \
+ --index-name uid
+ create-backend-index --backend-name newBackend \
+ --type generic \
+ --set index-type:equality \
+ --set index-type:substring \
+ --index-name mail
+END_OF_COMMAND_INPUT</userinput>
+ </screen>
</step>
<step>
diff --git a/opendj-server-legacy/src/main/docbkx/release-notes/chap-whats-new.xml b/opendj-server-legacy/src/main/docbkx/release-notes/chap-whats-new.xml
index 323fcfb..dd1bee7 100644
--- a/opendj-server-legacy/src/main/docbkx/release-notes/chap-whats-new.xml
+++ b/opendj-server-legacy/src/main/docbkx/release-notes/chap-whats-new.xml
@@ -70,6 +70,17 @@
<listitem>
<para>
+ The <command>dsconfig</command> command now supports
+ a <option>--batch</option> option for reading subcommands from standard input
+ (<link
+ xlink:show="new"
+ xlink:href="https://bugster.forgerock.org/jira/browse/OPENDJ-1840"
+ >OPENDJ-1840</link>).
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
OpenDJ directory server now requires a privilege,
<literal>changelog-read</literal> to read and search entries
under <literal>cn=changelog</literal>
--
Gitblit v1.10.0