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

Re: use and abuse of Debconf, follows-up



On Fri, Feb 02, 2001 at 04:03:44PM +0100, J?r?me Marant wrote:
> Mark Brown <broonie@sirena.org.uk> writes:
> 
> > On Fri, Feb 02, 2001 at 02:52:32PM +0100, J=E9r=F4me Marant wrote:
> > > Tollef Fog Heen <tollef@add.no> writes:
> >=20
> > > > Don't mark the file as a conffile?
> >=20
> > >   Ok, but how can I keep the file unmodified across upgrades ?
> >=20
> > Don't include it in the package at all and have your scripts update i=
> t as
> > needed.
> 
>   So, if I understood correctly, I could do something like this in the
>   postinst :
> 
>     # Copying a default file if it does not exist
>     if [ ! -f /etc/myconf.conf ]; then
>         cp /usr/share/doc/mypackage/examples/myconf.conf /etc
>     fi
> 
>     Then, I coulf modify the parameters within the script. Is this righ=
> t ?
> 

and don't forget to put this in the postrm:

# remove untagged conf file.
if [ "$1" = "purge" ]; then
    rm -f /etc/myconf.conf
fi

-brad



Reply to: