[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packaging phpLDAPadmin. Newbie's questions.



On Fri, Nov 14, 2003 at 05:37:02PM +1100, Matthew Palmer wrote:
> On Thu, Nov 13, 2003 at 09:51:22PM -0600, David Segonds wrote:
> > On Fri, Nov 14, 2003 at 10:46:35AM +1100, Matthew Palmer wrote:

> If you mean producing a template file with tags which you macro-replace at
> configuration time, that's also done, and works well enough if combined with
> something that ensures that the user's config file doesn't get blotted if
> they want to fiddle with it themselves - so the md5sum idea above can be
> used.

In some cases, it should also be possible to parse the configuration
file using perl, grab all the parameters that the user modified and spit
them out in your own clean format. A little bit like what 'swat' does.
It reads the initial configuration files, add the information obtained
interactively and write a new configuration file.

AS PHP syntax is similar to perl's, I should be able to do that.

The danger is that if you have a bug, some user configurations may be
lost in the process.

> Honestly, config file handling is a serious bugbear, both in Debian and in
> general.  It's hard to do it so that the user can have their own changes,
> and the maintainer can do his own thing too without fear of breaking
> something.

Yes, but this is the fun and challenging part! :)

> For PHP apps, the best way to go is just to source each one of those, in
> order, (or the first two, anyway), so that the system config options
> override the distro ones if both are set.

Yes, logcheck is operating this way. I like this idea too.

> Don't know if it's of any use in your case, but I thought I'd espouse my
> thoughts - might be of use to someone.

Thanks.

David.
-- 
David Segonds - PGP 0x1F7A3E7A

Attachment: pgpL21iCmLDbE.pgp
Description: PGP signature


Reply to: