Gentoo Archives: gentoo-commits

From: Ian Delaney <idella4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-nds/389-ds-base/files/, net-nds/389-ds-base/
Date: Tue, 02 Feb 2016 12:56:55
Message-Id: 1454416722.fc70355936299a8dd87041a2f9017576eb19ed27.idella4@gentoo
1 commit: fc70355936299a8dd87041a2f9017576eb19ed27
2 Author: Wes Cilldhaire <wes <AT> sol1 <DOT> com <DOT> au>
3 AuthorDate: Tue Feb 2 12:38:42 2016 +0000
4 Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 2 12:38:42 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc703559
7
8 net-nds/389-ds-base: version bump to 1.3.4.7
9
10 co-authored with upstream (wibrown <AT> redhat.com)
11
12 Gentoo-bug: 573450
13
14 Package-Manager: portage-2.2.27
15
16 net-nds/389-ds-base/389-ds-base-1.3.4.7.ebuild | 156 ++++++++
17 net-nds/389-ds-base/Manifest | 1 +
18 .../389-ds-base-1.3.4.7-no-instance-script.patch | 396 +++++++++++++++++++++
19 .../389-ds-base-1.3.4.7-shell-corrections.patch | 242 +++++++++++++
20 net-nds/389-ds-base/files/389-ds.initd-r1 | 88 +++++
21 5 files changed, 883 insertions(+)
22
23 diff --git a/net-nds/389-ds-base/389-ds-base-1.3.4.7.ebuild b/net-nds/389-ds-base/389-ds-base-1.3.4.7.ebuild
24 new file mode 100644
25 index 0000000..e29a0c9
26 --- /dev/null
27 +++ b/net-nds/389-ds-base/389-ds-base-1.3.4.7.ebuild
28 @@ -0,0 +1,156 @@
29 +# Copyright 1999-2016 Gentoo Foundation
30 +# Distributed under the terms of the GNU General Public License v2
31 +# $Id$
32 +
33 +EAPI=5
34 +
35 +WANT_AUTOMAKE="1.9"
36 +MY_P=${P/_alpha/.a}
37 +MY_P=${MY_P/_rc/.rc}
38 +
39 +inherit user eutils multilib flag-o-matic autotools
40 +
41 +DESCRIPTION="389 Directory Server (core librares and daemons )"
42 +HOMEPAGE="http://port389.org/"
43 +SRC_URI="http://directory.fedoraproject.org/sources/${MY_P}.tar.bz2"
44 +
45 +LICENSE="GPL-3"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~x86"
48 +IUSE="autobind auto-dn-suffix debug doc +pam-passthru +dna +ldapi +bitwise +presence kerberos selinux"
49 +
50 +ALL_DEPEND="
51 + =sys-libs/db-5*:*
52 + >=dev-libs/cyrus-sasl-2.1.19
53 + >=net-analyzer/net-snmp-5.1.2
54 + >=dev-libs/icu-3.4:=
55 + dev-libs/nss[utils]
56 + dev-libs/nspr
57 + dev-libs/svrcore
58 + dev-libs/openssl:0=
59 + dev-libs/libpcre:3
60 + >=dev-perl/perl-mozldap-1.5.3
61 + dev-perl/NetAddr-IP
62 + net-nds/openldap
63 + sys-libs/pam
64 + sys-libs/zlib
65 + kerberos? ( >=app-crypt/mit-krb5-1.7-r100[openldap] )"
66 +
67 +DEPEND="${ALL_DEPEND}
68 + virtual/pkgconfig
69 + sys-devel/libtool
70 + doc? ( app-doc/doxygen )
71 + sys-apps/sed"
72 +RDEPEND="${ALL_DEPEND}
73 + selinux? ( sec-policy/selinux-dirsrv )
74 + virtual/perl-Time-Local
75 + virtual/perl-MIME-Base64"
76 +
77 +S="${WORKDIR}/${MY_P}"
78 +
79 +pkg_setup() {
80 + enewgroup dirsrv
81 + enewuser dirsrv -1 -1 -1 dirsrv
82 +}
83 +
84 +src_prepare() {
85 + #0001-Ticket-47840-add-configure-option-to-disable-instanc.patch
86 + epatch "${FILESDIR}/${P}-no-instance-script.patch"
87 +
88 + #0001-Ticket-48448-dirsrv-start-stop-fail-in-certain-shell.patch
89 + epatch "${FILESDIR}/${P}-shell-corrections.patch"
90 +
91 + # as per 389 documentation, when 64bit, export USE_64
92 + use amd64 && export USE_64=1
93 +
94 + # This will be changed in 1.3.5.X
95 + sed -i -e 's/nobody/dirsrv/g' configure.ac || die "sed failed on configure.ac"
96 + eautoreconf
97 +
98 + append-lfs-flags
99 +}
100 +
101 +src_configure() {
102 + local myconf=""
103 +
104 + use auto-dn-suffix && myconf="${myconf} --enable-auto-dn-suffix"
105 +
106 + # for 1.3.5.X, will add --enable-gcc-security
107 + econf \
108 + $(use_enable debug) \
109 + $(use_enable pam-passthru) \
110 + $(use_enable ldapi) \
111 + $(use_enable autobind) \
112 + $(use_enable dna) \
113 + $(use_enable bitwise) \
114 + $(use_enable presence) \
115 + $(use_with kerberos) \
116 + $(use_enable debug) \
117 + --enable-maintainer-mode \
118 + --enable-autobind \
119 + --with-fhs \
120 + --with-openldap \
121 + --with-db-inc=/usr/include/${CHOST}/db5.3/ \
122 + --sbindir=/usr/sbin \
123 + --bindir=/usr/bin \
124 + $myconf
125 +
126 + # This relies on bug https://fedorahosted.org/389/ticket/48447
127 + #--without-initddir \
128 +}
129 +
130 +src_compile() {
131 + default
132 + if use doc; then
133 + doxygen slapi.doxy || die "cannot run doxygen"
134 + fi
135 +}
136 +
137 +src_install () {
138 + emake DESTDIR="${D}" install
139 +
140 + # for build free-ipa require winsync-plugin
141 + # Freeipa no longer uses winsync. Please see AD trust.
142 + doins ldap/servers/plugins/replication/winsync-plugin.h
143 + doins ldap/servers/plugins/replication/repl-session-plugin.h
144 +
145 + # remove redhat style init script
146 + rm -rf "${D}"/etc/rc.d || die
147 + # Needs a config option to remove this.
148 + rm -rf "${D}"/etc/default || die
149 +
150 + # and install gentoo style init script
151 + # Get these merged upstream
152 + newinitd "${FILESDIR}"/389-ds.initd-r1 389-ds
153 + newinitd "${FILESDIR}"/389-ds-snmp.initd 389-ds-snmp
154 +
155 + # cope with libraries being in /usr/lib/dirsrv
156 + dodir /etc/env.d
157 + echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${D}"/etc/env.d/08dirsrv
158 +
159 + if use doc; then
160 + cd "${S}" || die
161 + docinto html/
162 + dodoc -r docs/html/.
163 + fi
164 +}
165 +
166 +pkg_postinst() {
167 + echo
168 + elog "If you are planning to use 389-ds-snmp (ldap-agent),"
169 + elog "make sure to properly configure: /etc/dirsrv/config/ldap-agent.conf"
170 + elog "adding proper 'server' entries, and adding the lines below to"
171 + elog " => /etc/snmp/snmpd.conf"
172 + elog
173 + elog "master agentx"
174 + elog "agentXSocket /var/agentx/master"
175 + elog
176 + elog "To start 389 Directory Server (LDAP service) at boot:"
177 + elog
178 + elog " rc-update add 389-ds default"
179 + elog
180 + elog "If you are upgrading from previous 1.2.6 release candidates"
181 + elog "please see:"
182 + elog "http://directory.fedoraproject.org/wiki/Subtree_Rename#warning:_upgrade_from_389_v1.2.6_.28a.3F.2C_rc1_.7E_rc6.29_to_v1.2.6_rc6_or_newer"
183 + echo
184 +}
185
186 diff --git a/net-nds/389-ds-base/Manifest b/net-nds/389-ds-base/Manifest
187 index 13c1e88..0848725 100644
188 --- a/net-nds/389-ds-base/Manifest
189 +++ b/net-nds/389-ds-base/Manifest
190 @@ -1 +1,2 @@
191 DIST 389-ds-base-1.3.0.2.tar.bz2 3008002 SHA256 0482f8cddbb32dc44051d59efe085eb744295a32eac65fbcd0b1bfd807319755 SHA512 99d41e2df832eaf8d83ec32fd9e7ef1819d75640fae2c69e62f5d11998c29d780726cb5d97cec7a6ae410c440d5124ca8b9d0cb7091a437a57f2625b16fca29f WHIRLPOOL 8ad72341e15d05e6af0999808a1930f11c7589c211424f7dfa68c1d8d5cd18657086dbf9aa6c856dc84a3926b47ed46484b30e6f72819a22e26277a3c504c1e0
192 +DIST 389-ds-base-1.3.4.7.tar.bz2 3397520 SHA256 08dae55ed0732e8d316bb65910c74ee913fc215c3436299239e362a3670e76e6 SHA512 02159ce8e9d1e5797d6d6952202b430429bf750179279348430333f7a4b557e305a2041a1e4e7ffe652d34825c9678d3fbf8a3eaea401f257bd922034dbce875 WHIRLPOOL 97af90f6b3f01a2a11e236f1141d1851016711f69b618f2e3122715e8575541040aa09c03f66f7a20cca9e2136bb2d3612c8fcec16b616f981dba39c4f449453
193
194 diff --git a/net-nds/389-ds-base/files/389-ds-base-1.3.4.7-no-instance-script.patch b/net-nds/389-ds-base/files/389-ds-base-1.3.4.7-no-instance-script.patch
195 new file mode 100644
196 index 0000000..8af7ad2
197 --- /dev/null
198 +++ b/net-nds/389-ds-base/files/389-ds-base-1.3.4.7-no-instance-script.patch
199 @@ -0,0 +1,396 @@
200 +From 7b75e7a4c60637a86acf6c757f207550294279ef Mon Sep 17 00:00:00 2001
201 +From: William Brown <wibrown@××××××.com>
202 +Date: Wed, 28 Oct 2015 14:25:26 +1000
203 +Subject: [PATCH] Ticket 47840 - add configure option to disable instance
204 + specific scripts https://fedorahosted.org/389/ticket/47840
205 +MIME-Version: 1.0
206 +Content-Type: text/plain; charset=UTF-8
207 +Content-Transfer-Encoding: 8bit
208 +
209 +Bug Description: Now that ​https://fedorahosted.org/389/ticket/528 is
210 +fixed, the next step is to allow building the server with the instance specific
211 +scripts disabled.
212 +
213 +Fix Description: Instead of defining a configure option, we provide a new
214 +option in setup-ds.pl, slapd.InstScriptsEnabled, which defaults to false. All
215 +new installs of 389 will NOT install with a inst_dir nor the scripts that are in
216 +that directory.
217 +
218 +Additionally, this change fixes setup-ds.pl to correctly use the sbindir scripts
219 +to start/stop the server instance during installation.
220 +
221 +Finally, we add support for setup-ds.pl so that in --update if the inst_dir
222 +exists, scripts will be updated, but if it does not exist, no action is taken.
223 +
224 +In time, we will alter --update to *remove* the scripts within inst_dir during
225 +the update (We have no way of knowing if a customer has put custom scripts in
226 +inst_dir)
227 +
228 +Example:
229 +/opt/dirsrv/sbin/setup-ds.pl slapd.InstScriptsEnabled=false
230 +
231 +Author: wibrown
232 +
233 +Review by: nhosoi (Thanks!)
234 +---
235 + ldap/admin/src/scripts/DSCreate.pm.in | 204 +++++++++++++++++++--------------
236 + ldap/admin/src/scripts/DSUpdate.pm.in | 12 +-
237 + ldap/admin/src/scripts/setup-ds.res.in | 1 +
238 + 3 files changed, 124 insertions(+), 93 deletions(-)
239 +
240 +diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
241 +index 3ce5a73..6425be4 100644
242 +--- a/ldap/admin/src/scripts/DSCreate.pm.in
243 ++++ b/ldap/admin/src/scripts/DSCreate.pm.in
244 +@@ -130,6 +130,15 @@ sub sanityCheckParams {
245 + return @errs;
246 + }
247 +
248 ++ # We need to make sure this value is lowercase
249 ++ $inf->{slapd}->{InstScriptsEnabled} = lc $inf->{slapd}->{InstScriptsEnabled};
250 ++
251 ++ if ("true" ne $inf->{slapd}->{InstScriptsEnabled} && "false" ne $inf->{slapd}->{InstScriptsEnabled}) {
252 ++ debug(1, "InstScriptsEnabled is not a valid boolean");
253 ++ return ('error_invalid_boolean', $inf->{slapd}->{InstScriptsEnabled});
254 ++ }
255 ++
256 ++
257 + return ();
258 + }
259 +
260 +@@ -204,13 +213,17 @@ sub makeDSDirs {
261 + my $mode = getMode($inf, 7);
262 + my @errs;
263 +
264 ++ my @dsdirs = qw(config_dir schema_dir log_dir lock_dir run_dir tmp_dir cert_dir db_dir ldif_dir bak_dir);
265 ++ if ($inf->{slapd}->{InstScriptsEnabled} eq "true") {
266 ++ @dsdirs = qw(inst_dir config_dir schema_dir log_dir lock_dir run_dir tmp_dir cert_dir db_dir ldif_dir bak_dir);
267 ++ }
268 ++
269 + # These paths are owned by the SuiteSpotGroup
270 + # This allows the admin server to run as a different,
271 + # more privileged user than the directory server, but
272 + # still allows the admin server to manage directory
273 + # server files/dirs without being root
274 +- for my $kw (qw(inst_dir config_dir schema_dir log_dir lock_dir run_dir tmp_dir
275 +- cert_dir db_dir ldif_dir bak_dir)) {
276 ++ for my $kw (@dsdirs) {
277 + my $dir = $inf->{slapd}->{$kw};
278 + @errs = makePaths($dir, $mode, $inf->{General}->{SuiteSpotUserID},
279 + $inf->{General}->{SuiteSpotGroup});
280 +@@ -262,56 +275,66 @@ sub createInstanceScripts {
281 + my $myperl = "!$perlexec";
282 + my $mydevnull = (-f "/dev/null" ? " /dev/null " : " NUL ");
283 +
284 +- # determine initconfig_dir
285 +- my $initconfig_dir = $inf->{slapd}->{initconfig_dir} || get_initconfigdir($inf->{General}->{prefix});
286 +-
287 +- my %maptable = (
288 +- "DS-ROOT" => $inf->{General}->{prefix},
289 +- "SEP" => "/", # works on all platforms
290 +- "SERVER-NAME" => $inf->{General}->{FullMachineName},
291 +- "SERVER-PORT" => $inf->{slapd}->{ServerPort},
292 +- "PERL-EXEC" => $myperl,
293 +- "DEV-NULL" => $mydevnull,
294 +- "ROOT-DN" => $inf->{slapd}->{RootDN},
295 +- "LDIF-DIR" => $inf->{slapd}->{ldif_dir},
296 +- "SERV-ID" => $inf->{slapd}->{ServerIdentifier},
297 +- "BAK-DIR" => $inf->{slapd}->{bak_dir},
298 +- "SERVER-DIR" => $inf->{General}->{ServerRoot},
299 +- "CONFIG-DIR" => $inf->{slapd}->{config_dir},
300 +- "INITCONFIG-DIR" => $initconfig_dir,
301 +- "INST-DIR" => $inf->{slapd}->{inst_dir},
302 +- "RUN-DIR" => $inf->{slapd}->{run_dir},
303 +- "PRODUCT-NAME" => "slapd",
304 +- "SERVERBIN-DIR" => $inf->{slapd}->{sbindir},
305 +- "DB-DIR" => $inf->{slapd}->{db_dir}
306 +- );
307 +-
308 +- my $dir = "$inf->{General}->{prefix}@taskdir@";
309 +- for my $file (glob("$dir/template-*")) {
310 +- my $basename = $file;
311 +- $basename =~ s/^.*template-//;
312 +- my $destfile = "$inf->{slapd}->{inst_dir}/$basename";
313 +-
314 +- next if ($skip and -f $destfile); # in skip mode, skip files that already exist
315 +-
316 +- if (!open(SRC, "< $file")) {
317 +- return ("error_opening_scripttmpl", $file, $!);
318 +- }
319 +- if (!open(DEST, "> $destfile")) {
320 +- return ("error_opening_scripttmpl", $destfile, $!);
321 +- }
322 +- my $contents; # slurp entire file into memory
323 +- read SRC, $contents, int(-s $file);
324 +- close(SRC);
325 +- while (my ($key, $val) = each %maptable) {
326 +- $contents =~ s/\{\{$key\}\}/$val/g;
327 +- }
328 +- print DEST $contents;
329 +- close(DEST);
330 +- my @errs = changeOwnerMode($inf, 5, $destfile);
331 +- if (@errs) {
332 +- return @errs;
333 ++ # If we have InstScriptsEnabled, we likely have setup.inf or the argument.
334 ++ # However, during an upgrade, we need to know if we should upgrade the template files or not.
335 ++ # For now, the easiest way is to check to if the directory exists, and if is does, we assume we want to upgrade / create the updated scripts.
336 ++ if ($inf->{slapd}->{InstScriptsEnabled} eq "true" || -d $inf->{slapd}->{inst_dir} ) {
337 ++ debug(1, "Creating or updating instance directory scripts\n");
338 ++ # determine initconfig_dir
339 ++ my $initconfig_dir = $inf->{slapd}->{initconfig_dir} || get_initconfigdir($inf->{General}->{prefix});
340 ++
341 ++ my %maptable = (
342 ++ "DS-ROOT" => $inf->{General}->{prefix},
343 ++ "SEP" => "/", # works on all platforms
344 ++ "SERVER-NAME" => $inf->{General}->{FullMachineName},
345 ++ "SERVER-PORT" => $inf->{slapd}->{ServerPort},
346 ++ "PERL-EXEC" => $myperl,
347 ++ "DEV-NULL" => $mydevnull,
348 ++ "ROOT-DN" => $inf->{slapd}->{RootDN},
349 ++ "LDIF-DIR" => $inf->{slapd}->{ldif_dir},
350 ++ "SERV-ID" => $inf->{slapd}->{ServerIdentifier},
351 ++ "BAK-DIR" => $inf->{slapd}->{bak_dir},
352 ++ "SERVER-DIR" => $inf->{General}->{ServerRoot},
353 ++ "CONFIG-DIR" => $inf->{slapd}->{config_dir},
354 ++ "INITCONFIG-DIR" => $initconfig_dir,
355 ++ "INST-DIR" => $inf->{slapd}->{inst_dir},
356 ++ "RUN-DIR" => $inf->{slapd}->{run_dir},
357 ++ "PRODUCT-NAME" => "slapd",
358 ++ "SERVERBIN-DIR" => $inf->{slapd}->{sbindir},
359 ++ "DB-DIR" => $inf->{slapd}->{db_dir}
360 ++ );
361 ++
362 ++
363 ++ my $dir = "$inf->{General}->{prefix}@taskdir@";
364 ++ for my $file (glob("$dir/template-*")) {
365 ++ my $basename = $file;
366 ++ $basename =~ s/^.*template-//;
367 ++ my $destfile = "$inf->{slapd}->{inst_dir}/$basename";
368 ++ debug(1, "$destfile\n");
369 ++
370 ++ next if ($skip and -f $destfile); # in skip mode, skip files that already exist
371 ++
372 ++ if (!open(SRC, "< $file")) {
373 ++ return ("error_opening_scripttmpl", $file, $!);
374 ++ }
375 ++ if (!open(DEST, "> $destfile")) {
376 ++ return ("error_opening_scripttmpl", $destfile, $!);
377 ++ }
378 ++ my $contents; # slurp entire file into memory
379 ++ read SRC, $contents, int(-s $file);
380 ++ close(SRC);
381 ++ while (my ($key, $val) = each %maptable) {
382 ++ $contents =~ s/\{\{$key\}\}/$val/g;
383 ++ }
384 ++ print DEST $contents;
385 ++ close(DEST);
386 ++ my @errs = changeOwnerMode($inf, 5, $destfile);
387 ++ if (@errs) {
388 ++ return @errs;
389 ++ }
390 + }
391 ++ } else {
392 ++ debug(1, "No instance directory scripts will be updated or created\n");
393 + }
394 +
395 + return ();
396 +@@ -639,7 +662,7 @@ sub initDatabase {
397 + return ();
398 + }
399 +
400 +- my $cmd = "$inf->{slapd}->{inst_dir}/ldif2db -n $inf->{slapd}->{ds_bename} -i \'$ldiffile\'";
401 ++ my $cmd = "$inf->{slapd}->{sbindir}/ldif2db -Z $inf->{slapd}->{ServerIdentifier} -n $inf->{slapd}->{ds_bename} -i \'$ldiffile\'";
402 + $? = 0; # clear error condition
403 + my $output = `$cmd 2>&1`;
404 + my $result = $?;
405 +@@ -662,7 +685,7 @@ sub startServer {
406 + my @errs;
407 + # get error log
408 + my $errLog = "$inf->{slapd}->{log_dir}/errors";
409 +- my $startcmd = "$inf->{slapd}->{inst_dir}/start-slapd";
410 ++ my $startcmd = "$inf->{slapd}->{sbindir}/start-dirsrv $inf->{slapd}->{ServerIdentifier}";
411 + if ("@systemdsystemunitdir@" and (getLogin() eq 'root')) {
412 + $startcmd = "/bin/systemctl start @package_name@\@$inf->{slapd}->{ServerIdentifier}.service";
413 + }
414 +@@ -875,6 +898,10 @@ sub setDefaults {
415 + "@datadir@",
416 + $inf->{General}->{prefix});
417 +
418 ++ if (!defined($inf->{slapd}->{InstScriptsEnabled})) {
419 ++ $inf->{slapd}->{InstScriptsEnabled} = "false";
420 ++ }
421 ++
422 + if (!defined($inf->{slapd}->{inst_dir})) {
423 + $inf->{slapd}->{inst_dir} = "$inf->{General}->{ServerRoot}/slapd-$servid";
424 + }
425 +@@ -975,9 +1002,12 @@ sub updateSelinuxPolicy {
426 + system("restorecon -R $localstatedir/lib/@PACKAGE_NAME@");
427 + }
428 +
429 ++ my @inst_dirs = qw(config_dir schema_dir log_dir lock_dir run_dir tmp_dir cert_dir db_dir ldif_dir bak_dir);
430 ++ if ($inf->{slapd}->{InstScriptsEnabled} eq "true") {
431 ++ @inst_dirs = qw(inst_dir config_dir schema_dir log_dir lock_dir run_dir tmp_dir cert_dir db_dir ldif_dir bak_dir);
432 ++ }
433 + # run restorecon on all instance directories we created
434 +- for my $kw (qw(inst_dir config_dir schema_dir log_dir lock_dir run_dir tmp_dir
435 +- cert_dir db_dir ldif_dir bak_dir)) {
436 ++ for my $kw (@inst_dirs) {
437 + my $dir = $inf->{slapd}->{$kw};
438 + system("restorecon -R $dir");
439 + }
440 +@@ -1231,14 +1261,14 @@ sub createDSInstance {
441 + }
442 +
443 + sub stopServer {
444 +- my $instancedir = shift;
445 +- my $prog = $instancedir . "/stop-slapd";
446 ++ my $instance = shift;
447 ++ my $prog = "@sbindir@/stop-dirsrv";
448 + if (-x $prog) {
449 + $? = 0;
450 + # run the stop command
451 +- my $output = `$prog 2>&1`;
452 ++ my $output = `$prog $instance 2>&1`;
453 + my $status = $?;
454 +- debug(3, "stopping server $instancedir returns status $status: output $output\n");
455 ++ debug(3, "stopping server $instance returns status $status: output $output\n");
456 + if ($status) {
457 + debug(1,"Warning: Could not stop directory server: status $status: output $output\n");
458 + # if the server is not running, that's ok
459 +@@ -1254,7 +1284,7 @@ sub stopServer {
460 + return;
461 + }
462 +
463 +- debug(1, "Successfully stopped server $instancedir\n");
464 ++ debug(1, "Successfully stopped server $instance\n");
465 + return 1;
466 + }
467 +
468 +@@ -1331,23 +1361,16 @@ sub removeDSInstance {
469 + $conn->close();
470 +
471 + # stop the server
472 +- my $instdir = "";
473 +- if ($entry) {
474 +- foreach my $path ( @{$entry->{"nsslapd-instancedir"}} )
475 +- {
476 +- if (!stopServer($path)) {
477 +- if ($force) {
478 +- debug(1, "Warning: Could not stop directory server - Error: $! - forcing continue\n");
479 +- } elsif ($! == ENOENT) { # stop script not found or server not running
480 +- debug(1, "Warning: Could not stop directory server: already removed or not running\n");
481 +- push @errs, [ 'error_stopping_server', $path, $! ];
482 +- } else { # real error
483 +- debug(1, "Error: Could not stop directory server - aborting - use -f flag to force removal\n");
484 +- push @errs, [ 'error_stopping_server', $path, $! ];
485 +- return @errs;
486 +- }
487 +- }
488 +- $instdir = $path;
489 ++ if (!stopServer($inst)) {
490 ++ if ($force) {
491 ++ debug(1, "Warning: Could not stop directory server - Error: $! - forcing continue\n");
492 ++ } elsif ($! == ENOENT) { # stop script not found or server not running
493 ++ debug(1, "Warning: Could not stop directory server: already removed or not running\n");
494 ++ push @errs, [ 'error_stopping_server', $inst, $! ];
495 ++ } else { # real error
496 ++ debug(1, "Error: Could not stop directory server - aborting - use -f flag to force removal\n");
497 ++ push @errs, [ 'error_stopping_server', $inst, $! ];
498 ++ return @errs;
499 + }
500 + }
501 +
502 +@@ -1363,18 +1386,25 @@ sub removeDSInstance {
503 + push @errs, remove_tree($entry, "nsslapd-errorlog", $instname, 1);
504 + }
505 +
506 +- # instance dir
507 +- if ( -d $instdir && $instdir =~ /$instname/ )
508 +- {
509 +- # clean up pid files (if any)
510 +- remove_pidfile("STARTPIDFILE", $inst, $instdir, $instname, $rundir, $product_name);
511 +- remove_pidfile("PIDFILE", $inst, $instdir, $instname, $rundir, $product_name);
512 +
513 +- my $rc = rmtree($instdir);
514 +- if ( 0 == $rc )
515 ++ # instance dir
516 ++ my $instdir = "";
517 ++ if ($entry) {
518 ++ foreach my $instdir ( @{$entry->{"nsslapd-instancedir"}} )
519 + {
520 +- push @errs, [ 'error_removing_path', $instdir, $! ];
521 +- debug(1, "Warning: $instdir was not removed. Error: $!\n");
522 ++ if ( -d $instdir && $instdir =~ /$instname/ )
523 ++ {
524 ++ # clean up pid files (if any)
525 ++ remove_pidfile("STARTPIDFILE", $inst, $instdir, $instname, $rundir, $product_name);
526 ++ remove_pidfile("PIDFILE", $inst, $instdir, $instname, $rundir, $product_name);
527 ++
528 ++ my $rc = rmtree($instdir);
529 ++ if ( 0 == $rc )
530 ++ {
531 ++ push @errs, [ 'error_removing_path', $instdir, $! ];
532 ++ debug(1, "Warning: $instdir was not removed. Error: $!\n");
533 ++ }
534 ++ }
535 + }
536 + }
537 + # Finally, config dir
538 +diff --git a/ldap/admin/src/scripts/DSUpdate.pm.in b/ldap/admin/src/scripts/DSUpdate.pm.in
539 +index be1e67c..e84a9a9 100644
540 +--- a/ldap/admin/src/scripts/DSUpdate.pm.in
541 ++++ b/ldap/admin/src/scripts/DSUpdate.pm.in
542 +@@ -226,10 +226,10 @@ sub updateDS {
543 + for my $upd (@updates) {
544 + my @localerrs;
545 + if ($upd->{$PRE_STAGE}) {
546 +- debug(1, "Running stage $PRE_STAGE update ", $upd->{path}, "\n");
547 ++ debug(1, "Running updateDS stage $PRE_STAGE update ", $upd->{path}, "\n");
548 + @localerrs = &{$upd->{$PRE_STAGE}}($inf, $setup->{configdir});
549 + } elsif ($upd->{file}) {
550 +- debug(1, "Running stage $PRE_STAGE update ", $upd->{path}, "\n");
551 ++ debug(1, "Running updateDS stage $PRE_STAGE update ", $upd->{path}, "\n");
552 + @localerrs = processUpdate($upd, $inf, $setup->{configdir}, $PRE_STAGE);
553 + }
554 + if (@localerrs) {
555 +@@ -276,10 +276,10 @@ sub updateDS {
556 + for my $upd (@updates) {
557 + my @localerrs;
558 + if ($upd->{$POST_STAGE}) {
559 +- debug(1, "Running stage $POST_STAGE update ", $upd->{path}, "\n");
560 ++ debug(1, "Running updateDS stage $POST_STAGE update ", $upd->{path}, "\n");
561 + @localerrs = &{$upd->{$POST_STAGE}}($inf, $setup->{configdir});
562 + } elsif ($upd->{file}) {
563 +- debug(1, "Running stage $POST_STAGE update ", $upd->{path}, "\n");
564 ++ debug(1, "Running updateDS stage $POST_STAGE update ", $upd->{path}, "\n");
565 + @localerrs = processUpdate($upd, $inf, $setup->{configdir}, $POST_STAGE);
566 + }
567 + if (@localerrs) {
568 +@@ -385,10 +385,10 @@ sub updateDSInstance {
569 + for my $upd (@{$updates}) {
570 + my @localerrs;
571 + if ($upd->{$stage}) {
572 +- debug(1, "Running stage $stage update ", $upd->{path}, "\n");
573 ++ debug(1, "Running updateDSInstance stage $stage update ", $upd->{path}, "\n");
574 + @localerrs = &{$upd->{$stage}}($inf, $inst, $dseldif, $conn);
575 + } elsif ($upd->{file}) {
576 +- debug(1, "Running stage $stage update ", $upd->{path}, "\n");
577 ++ debug(1, "Running updateDSInstance stage $stage update ", $upd->{path}, "\n");
578 + @localerrs = processUpdate($upd, $inf, $configdir, $stage,
579 + $inst, $dseldif, $conn);
580 + }
581 +diff --git a/ldap/admin/src/scripts/setup-ds.res.in b/ldap/admin/src/scripts/setup-ds.res.in
582 +index 7134e25..fa37567 100644
583 +--- a/ldap/admin/src/scripts/setup-ds.res.in
584 ++++ b/ldap/admin/src/scripts/setup-ds.res.in
585 +@@ -116,6 +116,7 @@ error_creating_file = Could not create file '%s'. Error: %s\n
586 + error_copying_file = Could not copy file '%s' to '%s'. Error: %s\n
587 + error_enabling_feature = Could not enable the directory server feature '%s'. Error: %s\n
588 + error_importing_ldif = Could not import LDIF file '%s'. Error: %s. Output: %s\n
589 ++error_invalid_boolean = Could not convert value '%s' to boolean. Valid values are true or false.\n
590 + error_starting_server = Could not start the directory server using command '%s'. The last line from the error log was '%s'. Error: %s\n
591 + error_stopping_server = Could not stop the directory server '%s'. Error: %s\n
592 + error_missing_userid = The SuiteSpotUserID is missing. This must be set to valid user\n
593 +--
594 +2.4.3
595 +
596
597 diff --git a/net-nds/389-ds-base/files/389-ds-base-1.3.4.7-shell-corrections.patch b/net-nds/389-ds-base/files/389-ds-base-1.3.4.7-shell-corrections.patch
598 new file mode 100644
599 index 0000000..0842382
600 --- /dev/null
601 +++ b/net-nds/389-ds-base/files/389-ds-base-1.3.4.7-shell-corrections.patch
602 @@ -0,0 +1,242 @@
603 +From 340cdd3c9648c4b35ef95cc0498413b763e71859 Mon Sep 17 00:00:00 2001
604 +From: William Brown <firstyear@××××××.com>
605 +Date: Sun, 31 Jan 2016 14:27:13 +1000
606 +Subject: [PATCH] Ticket 48448 - dirsrv start-stop fail in certain shell
607 + environments.
608 +
609 +Bug Description: Dirsrv fails to start and stop with certain shell environments
610 +. This is due to the usage of the pattern
611 +
612 + cd $SERVERBIN_DIR
613 + ./ns-slapd ...
614 +
615 +Fix Description: Change all invocations of commands to use explicit paths:
616 +
617 + $SERVERBIN_DIR/ns-slapd
618 +
619 +https://fedorahosted.org/389/ticket/48448
620 +
621 +Author: wibrown
622 +
623 +Review by: ???
624 +---
625 + ldap/admin/src/scripts/start-dirsrv.in | 2 +-
626 + ldap/admin/src/scripts/template-bak2db.in | 3 +--
627 + ldap/admin/src/scripts/template-db2bak.in | 5 ++---
628 + ldap/admin/src/scripts/template-db2index.in | 5 ++---
629 + ldap/admin/src/scripts/template-db2ldif.in | 3 +--
630 + ldap/admin/src/scripts/template-dbverify.in | 5 ++---
631 + ldap/admin/src/scripts/template-dn2rdn.in | 5 ++---
632 + ldap/admin/src/scripts/template-ldif2db.in | 3 +--
633 + ldap/admin/src/scripts/template-ldif2ldap.in | 5 ++---
634 + ldap/admin/src/scripts/template-monitor.in | 5 ++---
635 + ldap/admin/src/scripts/template-restoreconfig.in | 5 ++---
636 + ldap/admin/src/scripts/template-saveconfig.in | 5 ++---
637 + ldap/admin/src/scripts/template-suffix2instance.in | 5 ++---
638 + ldap/admin/src/scripts/template-upgradedb.in | 3 +--
639 + ldap/admin/src/scripts/template-upgradednformat.in | 5 ++---
640 + ldap/admin/src/scripts/template-vlvindex.in | 3 +--
641 + 16 files changed, 26 insertions(+), 41 deletions(-)
642 +
643 +diff --git a/ldap/admin/src/scripts/start-dirsrv.in b/ldap/admin/src/scripts/start-dirsrv.in
644 +index 458f0e8..513addb 100755
645 +--- a/ldap/admin/src/scripts/start-dirsrv.in
646 ++++ b/ldap/admin/src/scripts/start-dirsrv.in
647 +@@ -70,7 +70,7 @@ start_instance() {
648 + return 1
649 + fi
650 + else
651 +- cd $SERVERBIN_DIR; ./ns-slapd -D $CONFIG_DIR -i $PIDFILE -w $STARTPIDFILE "$@"
652 ++ $SERVERBIN_DIR/ns-slapd -D $CONFIG_DIR -i $PIDFILE -w $STARTPIDFILE "$@"
653 + if [ $? -ne 0 ]; then
654 + return 1
655 + fi
656 +diff --git a/ldap/admin/src/scripts/template-bak2db.in b/ldap/admin/src/scripts/template-bak2db.in
657 +index 1725aba..01a12fa 100755
658 +--- a/ldap/admin/src/scripts/template-bak2db.in
659 ++++ b/ldap/admin/src/scripts/template-bak2db.in
660 +@@ -1,5 +1,4 @@
661 + #!/bin/sh
662 +
663 +-cd {{SERVERBIN-DIR}}
664 +-./bak2db "$@" -Z {{SERV-ID}}
665 ++{{SERVERBIN-DIR}}/bak2db "$@" -Z {{SERV-ID}}
666 + exit $?
667 +diff --git a/ldap/admin/src/scripts/template-db2bak.in b/ldap/admin/src/scripts/template-db2bak.in
668 +index 50fd5ed..70a4a2b 100755
669 +--- a/ldap/admin/src/scripts/template-db2bak.in
670 ++++ b/ldap/admin/src/scripts/template-db2bak.in
671 +@@ -1,5 +1,4 @@
672 + #!/bin/sh
673 +
674 +-cd {{SERVERBIN-DIR}}
675 +-./db2bak "$@" -Z {{SERV-ID}}
676 +-exit $?
677 +\ No newline at end of file
678 ++{{SERVERBIN-DIR}}/db2bak "$@" -Z {{SERV-ID}}
679 ++exit $?
680 +diff --git a/ldap/admin/src/scripts/template-db2index.in b/ldap/admin/src/scripts/template-db2index.in
681 +index a7a633d..9c7c5ec 100755
682 +--- a/ldap/admin/src/scripts/template-db2index.in
683 ++++ b/ldap/admin/src/scripts/template-db2index.in
684 +@@ -1,5 +1,4 @@
685 + #!/bin/sh
686 +
687 +-cd {{SERVERBIN-DIR}}
688 +-./db2index "$@" -Z {{SERV-ID}}
689 +-exit $?
690 +\ No newline at end of file
691 ++{{SERVERBIN-DIR}}/db2index "$@" -Z {{SERV-ID}}
692 ++exit $?
693 +diff --git a/ldap/admin/src/scripts/template-db2ldif.in b/ldap/admin/src/scripts/template-db2ldif.in
694 +index b85ffdc..3881911 100755
695 +--- a/ldap/admin/src/scripts/template-db2ldif.in
696 ++++ b/ldap/admin/src/scripts/template-db2ldif.in
697 +@@ -1,6 +1,5 @@
698 + #!/bin/sh
699 +
700 + cwd=`pwd`
701 +-cd {{SERVERBIN-DIR}}
702 +-./db2ldif "$@" -Z {{SERV-ID}} -c $cwd
703 ++{{SERVERBIN-DIR}}/db2ldif "$@" -Z {{SERV-ID}} -c $cwd
704 + exit $?
705 +diff --git a/ldap/admin/src/scripts/template-dbverify.in b/ldap/admin/src/scripts/template-dbverify.in
706 +index 71e3e4e..abcc58e 100755
707 +--- a/ldap/admin/src/scripts/template-dbverify.in
708 ++++ b/ldap/admin/src/scripts/template-dbverify.in
709 +@@ -1,5 +1,4 @@
710 + #!/bin/sh
711 +
712 +-cd {{SERVERBIN-DIR}}
713 +-./dbverify "$@" -Z {{SERV-ID}}
714 +-exit $?
715 +\ No newline at end of file
716 ++{{SERVERBIN-DIR}}/dbverify "$@" -Z {{SERV-ID}}
717 ++exit $?
718 +diff --git a/ldap/admin/src/scripts/template-dn2rdn.in b/ldap/admin/src/scripts/template-dn2rdn.in
719 +index b3d8e82..9ecae08 100755
720 +--- a/ldap/admin/src/scripts/template-dn2rdn.in
721 ++++ b/ldap/admin/src/scripts/template-dn2rdn.in
722 +@@ -1,5 +1,4 @@
723 + #!/bin/sh
724 +
725 +-cd {{SERVERBIN-DIR}}
726 +-./dn2rdn "$@" -Z {{SERV-ID}}
727 +-exit $?
728 +\ No newline at end of file
729 ++{{SERVERBIN-DIR}}/dn2rdn "$@" -Z {{SERV-ID}}
730 ++exit $?
731 +diff --git a/ldap/admin/src/scripts/template-ldif2db.in b/ldap/admin/src/scripts/template-ldif2db.in
732 +index f3fa58e..f38fce3 100755
733 +--- a/ldap/admin/src/scripts/template-ldif2db.in
734 ++++ b/ldap/admin/src/scripts/template-ldif2db.in
735 +@@ -1,5 +1,4 @@
736 + #!/bin/sh
737 +
738 +-cd {{SERVERBIN-DIR}}
739 +-./ldif2db "$@" -Z {{SERV-ID}}
740 ++{{SERVERBIN-DIR}}/ldif2db "$@" -Z {{SERV-ID}}
741 + exit $?
742 +diff --git a/ldap/admin/src/scripts/template-ldif2ldap.in b/ldap/admin/src/scripts/template-ldif2ldap.in
743 +index 806ddcc..c785742 100755
744 +--- a/ldap/admin/src/scripts/template-ldif2ldap.in
745 ++++ b/ldap/admin/src/scripts/template-ldif2ldap.in
746 +@@ -1,5 +1,4 @@
747 + #!/bin/sh
748 +
749 +-cd {{SERVERBIN-DIR}}
750 +-./ldif2ldap "$@" -Z {{SERV-ID}}
751 +-exit $?
752 +\ No newline at end of file
753 ++{{SERVERBIN-DIR}}/ldif2ldap "$@" -Z {{SERV-ID}}
754 ++exit $?
755 +diff --git a/ldap/admin/src/scripts/template-monitor.in b/ldap/admin/src/scripts/template-monitor.in
756 +index 2f93337..c89bb8a 100755
757 +--- a/ldap/admin/src/scripts/template-monitor.in
758 ++++ b/ldap/admin/src/scripts/template-monitor.in
759 +@@ -1,5 +1,4 @@
760 + #!/bin/sh
761 +
762 +-cd {{SERVERBIN-DIR}}
763 +-./monitor "$@" -Z {{SERV-ID}}
764 +-exit $?
765 +\ No newline at end of file
766 ++{{SERVERBIN-DIR}}/monitor "$@" -Z {{SERV-ID}}
767 ++exit $?
768 +diff --git a/ldap/admin/src/scripts/template-restoreconfig.in b/ldap/admin/src/scripts/template-restoreconfig.in
769 +index f4b2d06..5109561 100755
770 +--- a/ldap/admin/src/scripts/template-restoreconfig.in
771 ++++ b/ldap/admin/src/scripts/template-restoreconfig.in
772 +@@ -1,5 +1,4 @@
773 + #!/bin/sh
774 +
775 +-cd {{SERVERBIN-DIR}}
776 +-./restoreconfig "$@" -Z {{SERV-ID}}
777 +-exit $?
778 +\ No newline at end of file
779 ++{{SERVERBIN-DIR}}/restoreconfig "$@" -Z {{SERV-ID}}
780 ++exit $?
781 +diff --git a/ldap/admin/src/scripts/template-saveconfig.in b/ldap/admin/src/scripts/template-saveconfig.in
782 +index c77cce1..7784e83 100755
783 +--- a/ldap/admin/src/scripts/template-saveconfig.in
784 ++++ b/ldap/admin/src/scripts/template-saveconfig.in
785 +@@ -1,5 +1,4 @@
786 + #!/bin/sh
787 +
788 +-cd {{SERVERBIN-DIR}}
789 +-./saveconfig "$@" -Z {{SERV-ID}}
790 +-exit $?
791 +\ No newline at end of file
792 ++{{SERVERBIN-DIR}}/saveconfig "$@" -Z {{SERV-ID}}
793 ++exit $?
794 +diff --git a/ldap/admin/src/scripts/template-suffix2instance.in b/ldap/admin/src/scripts/template-suffix2instance.in
795 +index 03bcba8..e29408d 100755
796 +--- a/ldap/admin/src/scripts/template-suffix2instance.in
797 ++++ b/ldap/admin/src/scripts/template-suffix2instance.in
798 +@@ -1,5 +1,4 @@
799 + #!/bin/sh
800 +
801 +-cd {{SERVERBIN-DIR}}
802 +-./suffix2instance "$@" -Z {{SERV-ID}}
803 +-exit $?
804 +\ No newline at end of file
805 ++{{SERVERBIN-DIR}}/suffix2instance "$@" -Z {{SERV-ID}}
806 ++exit $?
807 +diff --git a/ldap/admin/src/scripts/template-upgradedb.in b/ldap/admin/src/scripts/template-upgradedb.in
808 +index ce879bb..ae28ac2 100755
809 +--- a/ldap/admin/src/scripts/template-upgradedb.in
810 ++++ b/ldap/admin/src/scripts/template-upgradedb.in
811 +@@ -1,5 +1,4 @@
812 + #!/bin/sh
813 +
814 +-cd {{SERVERBIN-DIR}}
815 +-./upgradedb "$@" -Z {{SERV-ID}}
816 ++{{SERVERBIN-DIR}}/upgradedb "$@" -Z {{SERV-ID}}
817 + exit $?
818 +diff --git a/ldap/admin/src/scripts/template-upgradednformat.in b/ldap/admin/src/scripts/template-upgradednformat.in
819 +index 5fd8ef9..74c18e8 100755
820 +--- a/ldap/admin/src/scripts/template-upgradednformat.in
821 ++++ b/ldap/admin/src/scripts/template-upgradednformat.in
822 +@@ -1,5 +1,4 @@
823 + #!/bin/sh
824 +
825 +-cd {{SERVERBIN-DIR}}
826 +-./upgradednformat "$@" -Z {{SERV-ID}}
827 +-exit $?
828 +\ No newline at end of file
829 ++{{SERVERBIN-DIR}}/upgradednformat "$@" -Z {{SERV-ID}}
830 ++exit $?
831 +diff --git a/ldap/admin/src/scripts/template-vlvindex.in b/ldap/admin/src/scripts/template-vlvindex.in
832 +index 0249696..a7ffb40 100755
833 +--- a/ldap/admin/src/scripts/template-vlvindex.in
834 ++++ b/ldap/admin/src/scripts/template-vlvindex.in
835 +@@ -1,5 +1,4 @@
836 + #!/bin/sh
837 +
838 +-cd {{SERVERBIN-DIR}}
839 +-./vlvindex "$@" -Z {{SERV-ID}}
840 ++{{SERVERBIN-DIR}}/vlvindex "$@" -Z {{SERV-ID}}
841 + exit $?
842 +--
843 +2.5.0
844 +
845
846 diff --git a/net-nds/389-ds-base/files/389-ds.initd-r1 b/net-nds/389-ds-base/files/389-ds.initd-r1
847 new file mode 100644
848 index 0000000..a0b83d8
849 --- /dev/null
850 +++ b/net-nds/389-ds-base/files/389-ds.initd-r1
851 @@ -0,0 +1,88 @@
852 +#!/sbin/runscript
853 +# Copyright 1999-2010 Gentoo Foundation
854 +# Distributed under the terms of the GNU General Public License v2
855 +# $Id$
856 +
857 +DIRSRV_EXEC="/usr/sbin/ns-slapd"
858 +PID_DIRECTORY="/var/run/dirsrv"
859 +DIRSRV_CONF_DIR="/etc/dirsrv"
860 +DS_INSTANCES=${DIRSRV_CONF_DIR}/slapd-*
861 +F389DS_INSTANCES=""
862 +
863 +depend() {
864 + need net logger
865 + use dns
866 + provide dirsvr ldap
867 +}
868 +
869 +checkconfig() {
870 + if [ -z "${DS_INSTANCES}" ]; then
871 + eerror "389 Directory Server has not been configured."
872 + eend 1
873 + return 1
874 + fi
875 +}
876 +
877 +start() {
878 + checkconfig || return 1
879 +
880 + for instance in ${DS_INSTANCES}; do
881 + instance=$(basename ${instance})
882 + # skip .removed instances, bug #338133
883 + if [ "${instance%%.removed}" != "${instance}" ]; then
884 + continue
885 + fi
886 + # Create the required directories in case they got nuked
887 + mkdir -p /var/lock/dirsrv/${instance}
888 + # This will probably break one day, we should be pulling out the suitespotuser from dse.ldif
889 + chown dirsrv: /var/lock/dirsrv/${instance}
890 + ebegin "Starting 389 Directory Server: instance ${instance}"
891 + start-stop-daemon --start --quiet -m \
892 + --pidfile ${PID_DIRECTORY}/${instance}.startpid \
893 + --exec ${DIRSRV_EXEC} -- -D ${DIRSRV_CONF_DIR}/${instance} \
894 + -i ${PID_DIRECTORY}/${instance}.pid \
895 + -w ${PID_DIRECTORY}/${instance}.startpid
896 + sts=${?}
897 + eend ${sts}
898 + if [ "${sts}" != "0" ]; then
899 + return 1
900 + fi
901 + done
902 +}
903 +
904 +
905 +
906 +stop() {
907 + checkconfig || return 1
908 +
909 + for instance in ${DS_INSTANCES}; do
910 + instance=$(basename ${instance})
911 + if [ "${instance%%.removed}" != "${instance}" ]; then
912 + continue
913 + fi
914 + ebegin "Stopping 389 Directory Server: instance ${instance}"
915 + start-stop-daemon --stop --quiet \
916 + --pidfile ${PID_DIRECTORY}/${instance}.pid \
917 + --exec ${DIRSRV_EXEC}
918 + eend ${?}
919 + done
920 +}
921 +
922 +status() {
923 + for instance in ${DS_INSTANCES}; do
924 + instance=$(basename ${instance})
925 + if [ "${instance%%.removed}" != "${instance}" ]; then
926 + continue
927 + fi
928 + if [ -e ${PID_DIRECTORY}/${instance}.pid ]; then
929 + pid=$(cat ${PID_DIRECTORY}/${instance}.pid)
930 + if [ $(echo "$pid" | grep -c $pid) -ge 1 ]; then
931 + einfo "389 Directory Server: instance ${instance} (pid $pid) running."
932 + else
933 + ewarn "389 Directory Server: instance ${instance} (pid $pid) NOT running."
934 + fi
935 + else
936 + eerror "389 Directory Server: instance ${instance} is NOT running."
937 + fi
938 + done
939 +}