summaryrefslogtreecommitdiffstats
path: root/wrappers
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2007-10-05 23:45:50 +0000
committerRich Megginson <rmeggins@redhat.com>2007-10-05 23:45:50 +0000
commitb786eb2121dc924b985966036095f3f9ca638cf6 (patch)
tree1747652ad5f4da7e8c8a6e46850dc193840d66ca /wrappers
parentb47079a1c1f3e29762925554f7bfaf9f22dedddd (diff)
downloadds-b786eb2121dc924b985966036095f3f9ca638cf6.tar.gz
ds-b786eb2121dc924b985966036095f3f9ca638cf6.tar.xz
ds-b786eb2121dc924b985966036095f3f9ca638cf6.zip
Resolves: bug 248169
Bug Description: init script modification needed for kerberos auth Reviewed by: nhosoi (Thanks!) Fix Description: I just took Simo's initial patch and ran with it. The initconfigdir parameter is the directory containing the config file for the init script. configure will first try to use $(sysconfdir)/sysconfig, then $(sysconfdir)/default (Solaris and Debian, among others), then the package config directory (the default on HP-UX), for this parameter. The init script and startup script will look in the initconfigdir to find the init config file to source. For directory server, an instance specific file can be used, named e.g. dirsrv-localhost which will apply to the slapd-localhost instance only. A default init config file is provided for dirsrv and dirsrv-admin, with some examples of how it could be used. Platforms tested: RHEL5 x86_64 Flag Day: Yes - autotool file changes Doc impact: Yes. We will need to document how the user can supply environment to the servers at startup time without having to edit the init scripts or the startup scripts. QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
Diffstat (limited to 'wrappers')
-rw-r--r--wrappers/initscript.in9
1 files changed, 8 insertions, 1 deletions
diff --git a/wrappers/initscript.in b/wrappers/initscript.in
index 28a5d37e..320d3506 100644
--- a/wrappers/initscript.in
+++ b/wrappers/initscript.in
@@ -86,6 +86,8 @@ instbase="@instconfigdir@"
umask 077
+[ -f @initconfigdir@/@package_name@ ] && . @initconfigdir@/@package_name@
+
INSTANCES=""
for FILE in `/bin/ls -d $instbase/slapd-* 2>/dev/null`; do
@@ -143,7 +145,12 @@ start() {
rm -f $pidfile
rm -f $startpidfile
fix_pid_dir_ownership $instbase/slapd-$instance
- $exec -D $instbase/slapd-$instance -i $pidfile -w $startpidfile
+ # start the directory server in a subshell so that the instance specific
+ # init config environment will not apply to any other instance
+ (
+ [ -f @initconfigdir@/@package_name@-$instance ] && . @initconfigdir@/@package_name@-$instance
+ $exec -D $instbase/slapd-$instance -i $pidfile -w $startpidfile
+ )
if [ $? -eq 0 ]; then
server_started=1 # well, perhaps not running, but started ok
else