summaryrefslogtreecommitdiffstats
path: root/wrappers
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2007-02-12 19:39:09 +0000
committerRich Megginson <rmeggins@redhat.com>2007-02-12 19:39:09 +0000
commit9d36662cfb331ef0a7c452086daa4ba96849d991 (patch)
tree0630576ac77aee299c9de0d6a8040eeeaf42533a /wrappers
parent2cbacc63087fc045f18b4dff451d7c98d4782f57 (diff)
downloadds-9d36662cfb331ef0a7c452086daa4ba96849d991.tar.gz
ds-9d36662cfb331ef0a7c452086daa4ba96849d991.tar.xz
ds-9d36662cfb331ef0a7c452086daa4ba96849d991.zip
Resolves: bug 227771
Bug Description: FHS: use sysconfdir (/etc) as config file location - allow builders to set dynamic config directory location at configure time Reviewed by: nhosoi, nkinder, prowley (Thanks!) Fix Description: I've added a new configure switch: --with-instconfigdir. This switch will allow the user to specify a different location to store the dynamic instance specific config files rather than the default $sysconfdir/$package_name (e.g. /etc/fedora-ds). This is the directory which will contain the slapd-instance directories which contain the instance specific config, schema, and security files. Even though the user could override this with ds_newinst.pl ([slapd] section config_dir), we needed to be able to set the default so that the user would not have to remember to do this every time, and so that packagers could set a reasonable default value for their platform. Platforms tested: FC6, RHEL4 Flag Day: no Doc impact: no
Diffstat (limited to 'wrappers')
-rw-r--r--wrappers/initscript.in8
1 files changed, 5 insertions, 3 deletions
diff --git a/wrappers/initscript.in b/wrappers/initscript.in
index 6c69e309..81b61728 100644
--- a/wrappers/initscript.in
+++ b/wrappers/initscript.in
@@ -30,7 +30,7 @@ lockfile="@localstatedir@/lock/subsys/@package_name@"
# PID directory
piddir="@localstatedir@/run/@package_name@"
# Instance basedir
-instbase="@sysconfdir@/@package_name@"
+instbase="@instconfigdir@"
[ -f $exec ] || exit 0
@@ -43,8 +43,10 @@ pids=$(pidof $exec)
INSTANCES=""
for FILE in `/bin/ls -d $instbase/slapd-* 2>/dev/null`; do
- INSTANCES+=$(echo "$FILE" | sed -e "s|$instbase/slapd-||")
- INSTANCES+=" "
+ if [ -d "$FILE" ] ; then
+ INSTANCES+=$(echo "$FILE" | sed -e "s|$instbase/slapd-||")
+ INSTANCES+=" "
+ fi
done
if [ -n "$2" ]; then