Re: use and abuse of debconf
On Mon, Jan 15, 2001 at 10:03:16AM +0100, Marcelo E. Magallon wrote:
> > else
> > sed -e "s/QUESTION=.*/QUESTION=$RET/" < /etc/foo > /etc/foo.new
> > mv -f /etc/foo.new /etc/foo
> > fi
>
> Did I miss something or will this really overwrite the value of
> QUESTION in /etc/foo every time the postinst is called?
It will update the value in /etc/foo with the value from debconf.
However, the config script Joey posted will read /etc/foo's
values into debconf first, so no information is lost.
This method also preserves any comments in the file, reordering
by the admin, etc.
Hamish
--
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>
Reply to: