summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2008-07-14 18:43:21 +0000
committerRich Megginson <rmeggins@redhat.com>2008-07-14 18:43:21 +0000
commita0b0c1bcbd2db970f27c587601e06e3b1ce07268 (patch)
tree99ff420601c6ecf2b0189e5e8a29fa4212b3e982
parenta4541ac7c3b0d3ff24967f00eebc75b6a0926d1e (diff)
downloadds-a0b0c1bcbd2db970f27c587601e06e3b1ce07268.tar.gz
ds-a0b0c1bcbd2db970f27c587601e06e3b1ce07268.tar.xz
ds-a0b0c1bcbd2db970f27c587601e06e3b1ce07268.zip
Resolves: bug 431103
Bug Description: Cannot setup ds with remote config DS Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: This fix has two main parts. The first part is to fix setup. I took parts out of the 01nsroot template and put them into the templates that set up the directory server and admin server. So when those servers are registered, they will create those common entries if not present, or otherwise modify them to add the necessary information. I had to add uname_m and uname_a and some other items to the mapping files. I fixed a typo in one of the template files. I changed setup to create new directory server instances shutdown, so that when they are configured for the passthrough auth plugin, it will be working when started. Otherwise, directory servers you create with setup will not be manageable in the console until after they are restarted. This is the same way that ds_create works. The second part of the fix is to allow people to fix "broken" installs. I added a -u (update) option to setup. This will scan for exsiting installations are re-register all servers found. The dialog flow is pretty simple - it just confirms that you want to run update mode, then asks for the config ds information, then re-registers all servers with the config ds, updating any information that is missing or outdated. Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: Yes - need to document the new -u option.
-rw-r--r--ldap/admin/src/scripts/Setup.pm.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/ldap/admin/src/scripts/Setup.pm.in b/ldap/admin/src/scripts/Setup.pm.in
index 645b0a89..ee3c7122 100644
--- a/ldap/admin/src/scripts/Setup.pm.in
+++ b/ldap/admin/src/scripts/Setup.pm.in
@@ -124,7 +124,7 @@ sub new {
sub init {
my $self = shift;
$self->{res} = shift;
- my ($silent, $inffile, $keep, $preonly, $logfile);
+ my ($silent, $inffile, $keep, $preonly, $logfile, $update);
GetOptions('help|h|?' => sub { VersionMessage(); HelpMessage(); exit 0 },
'version|v' => sub { VersionMessage(); exit 0 },
@@ -133,13 +133,15 @@ sub init {
'file|f=s' => \$inffile,
'keepcache|k' => \$keep,
'preonly|p' => \$preonly,
- 'logfile|l=s' => \$logfile
+ 'logfile|l=s' => \$logfile,
+ 'update|u' => \$update
);
$self->{silent} = $silent;
$self->{inffile} = $inffile;
$self->{keep} = $keep;
$self->{preonly} = $preonly;
+ $self->{update} = $update;
$self->{logfile} = $logfile;
$self->{log} = new SetupLog($self->{logfile});
# if user supplied inf file, use that to initialize
@@ -251,6 +253,7 @@ sub getDirServers {
$self->{dirservers} = [];
for my $dir (glob("$self->{configdir}/slapd-*")) {
if (-d $dir) {
+ $dir =~ s,$self->{configdir}/,,; # strip off dir part
push @{$self->{dirservers}}, $dir;
}
}