[Fedora-directory-commits] ldapserver/ldap/admin/src ds_newinst.pl.in, 1.3, 1.4

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/ldap/admin/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21168/ldapserver/ldap/admin/src

Modified Files:
	ds_newinst.pl.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: ds_newinst.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/ds_newinst.pl.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ds_newinst.pl.in	9 Feb 2007 22:33:59 -0000	1.3
+++ ds_newinst.pl.in	12 Feb 2007 19:39:04 -0000	1.4
@@ -194,10 +194,13 @@
 $cgiargs{"datadir"} = $table{"slapd"}->{"datadir"};
 $cgiargs{"docdir"} = $table{"slapd"}->{"docdir"};
 $cgiargs{"inst_dir"} = $table{"slapd"}->{"inst_dir"};
-$cgiargs{"config_dir"} = $table{"slapd"}->{"config_dir"};
 $cgiargs{"schema_dir"} = $table{"slapd"}->{"schema_dir"};
 $cgiargs{"sasl_path"} = $table{"slapd"}->{"sasl_path"};
-
+if ($table{"slapd"}->{"config_dir"}) {
+    $cgiargs{"config_dir"} = $table{"slapd"}->{"config_dir"};
+} else {
+    $cgiargs{"config_dir"} = "@instconfigdir@/slapd-" . $table{"slapd"}->{"ServerIdentifier"};
+}
 # port number for Admin Server - used to configure some web apps
 $cgiargs{adminport} = $table{admin}->{Port};
 




More information about the Fedora-directory-commits mailing list