[Fedora-directory-commits] ldapserver/wrappers initscript.in, 1.1, 1.2

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Mon Feb 12 19:39:11 UTC 2007


Author: rmeggins

Update of /cvs/dirsec/ldapserver/wrappers
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21168/ldapserver/wrappers

Modified Files:
	initscript.in 
Log Message:
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



Index: initscript.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/wrappers/initscript.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- initscript.in	9 Feb 2007 22:33:59 -0000	1.1
+++ initscript.in	12 Feb 2007 19:39:09 -0000	1.2
@@ -30,7 +30,7 @@
 # PID directory
 piddir="@localstatedir@/run/@package_name@"
 # Instance basedir
-instbase="@sysconfdir@/@package_name@"
+instbase="@instconfigdir@"
 
 
 [ -f $exec ] || exit 0
@@ -43,8 +43,10 @@
 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




More information about the Fedora-directory-commits mailing list