[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: slapd.conf include with globbing?

Hash: SHA1


> Off course it would work.
> But how would that save us any configuration work?
> Hint: You would have to configure the numbering of the files instead of
> just adding the right include statements. I prefer the way it is.

I have a real world example of course, where my question origininated.

In my installer for appX, I set up a slapd.conf.
It has (amongst others) the followng lines:

	# schema
	include /somewhere/schema/core.schema
	include /somewhere/schema/nis.schema
	include /somewhere/schema/appX.schema
	# global acl
	include /somewhere/acl/global.acl

	# databases
	include /somewhere/db/appX.conf

Now, I developed appY, which comes with an installer too.
AppY needs appX installed - all it does is add
- - one schema file
- - one database configuration

Now I need to modify the original slapd.conf and add these two include lines. 
This can be done of course with some perl or sed or awk; just adding two 
lines won't work since the first line (schema) needs to go in a different 
place then the second line. Also, with a re-install or upgrade of either appX 
or appY all kinds of problems arise with the slapd.conf file, all which of 
course are solvable with some external script.

However, if my slapd.conf looked like this:

	# schema
	include /somewhere/schema/*.schema
	# global acl
	include /somewhere/acl/global.acl

	# databases
	include /somewhere/db/*.conf

I wouldn't ever have to modify the slapd.conf file! Just put the right files 
in the right directory and restarting slapd will take care of it.
When upgrading or even deinstalling an application, just remove the files that 
'belong' to the application, and restart.

Is that such a bad idea?


website: http://www.suares.nl * http://www.qwikzite.nl
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)