/usr/sbin/setup-ds is in 389-ds-base 1.3.7.10-1ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | #!/usr/bin/env perl
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2013 Red Hat, Inc.
# All rights reserved.
#
# License: GPL (version 3 or any later version).
# See LICENSE for details.
# END COPYRIGHT BLOCK
#
use lib qw(/usr/lib/x86_64-linux-gnu/dirsrv/perl);
use strict;
use Setup;
use SetupLog;
use Inf;
use Resource;
use DialogManager;
use DSUtil;
use DSCreate;
use DSUpdate;
my $res = new Resource("/usr/share/dirsrv/properties/setup-ds.res");
my $setup = new Setup($res);
if (!$setup->{silent}) {
my $dialogmgr = new DialogManager($setup, $res, $TYPICAL);
my @dialogs;
if ($setup->{update}) {
require DSUpdateDialogs;
push @dialogs, DSUpdateDialogs->getDialogs();
} else {
require SetupDialogs;
require DSDialogs;
push @dialogs, SetupDialogs->getDialogs();
push @dialogs, DSDialogs->getDialogs();
}
$dialogmgr->addDialog(@dialogs);
my $rc = $dialogmgr->run();
if ($rc) {
$setup->doExit();
}
}
my @errs;
if ($setup->{update}) {
@errs = updateDS($setup);
} else {
@errs = createDSInstance($setup->{inf});
}
if (@errs) {
$setup->msg(@errs);
if ($setup->{update}) {
$setup->msg($FATAL, 'error_updating');
} else {
if($setup->{inf}->{slapd}->{ServerIdentifier} eq "admin"){
# 'admin' is reserved for the admin server - log the correct error
$setup->msg($FATAL, 'error_creating_dsinstance_adminid',
$setup->{inf}->{slapd}->{ServerIdentifier});
} else {
$setup->msg($FATAL, 'error_creating_dsinstance',
$setup->{inf}->{slapd}->{ServerIdentifier});
}
}
$setup->doExit(1);
} else {
if ($setup->{update}) {
$setup->msg('update_successful');
} else {
$setup->msg('created_dsinstance',
$setup->{inf}->{slapd}->{ServerIdentifier});
}
}
$setup->doExit(0);
END {
if ($setup and $setup->{keep}) {
$setup->{inf}->write("__temp__");
}
}
# emacs settings
# Local Variables:
# mode:perl
# indent-tabs-mode: nil
# tab-width: 4
# End:
|