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

Re: how to handle configuration that modifies files in /usr



This one time, at band camp, martin f krafft said:
> I am trying to package MHArc (www.mhonarc.org/mharc). It's a weird
> piece of software, partially because its runtime configuration
> mechanism involves changes to the installed scripts. The software
> itself installs e.g. a CGI script as:
> 
>   1. /usr/lib/mharc/cgi-bin/mnav.cgi.in.dist
> 
> Upon configuration, it creates
> 
>   2. /usr/lib/mharc/cgi-bin/mnav.cgi
> 
> from 
> 
>   3. /usr/lib/mharc/cgi-bin/mnav.cgi.in
> 
> (which it simply copies from #1 if it doesn't exist). This allows
> a user to modify the .in scripts (#3) without a software update
> affecting the customization.

Can't you install mnav.cgi.in.dist to /usr/share/doc/mharc/examples/ and
use it as a template for postinst configuration?  I'm not familiar with
the software, but this is how many other postinst-generated config files
are handled.  Then, since dpkg doesn't know about this file, you remove
it on purge.  Not the cleanest way to handle it - it would be better to
seperate out the configuration into a proper config file in /etc, but I
have no idea if that's feasible with this program.

HTH,
-- 
 --------------------------------------------------------------------------
|  Stephen Gran                  | This week only, all our fiber-fill      |
|  steve@lobefin.net             | jackets are marked down!                |
|  http://www.lobefin.net/~steve |                                         |
 --------------------------------------------------------------------------

Attachment: pgplh7iqpmL71.pgp
Description: PGP signature


Reply to: