Re: configuration file question
Hi,
>>"Remco" == Remco van de Meent <rvdmeent@xs4all.nl> writes:
Remco> The Packaging Manual states that one shouldn't touch the files
Remco> listed in debian/conffiles in the debian/postinst script. OK,
Remco> but I can't get that to work.
I don't understand. What is it that you can't get to work? Not
touching debian/conffiles? (that should be easy, right?)
Remco> In postinst, I want the user to be able to change the contents
Remco> of the conffile, /etc/webalizer.conf. This is done by some
Remco> magic using sed. But what if there already is a
Remco> /etc/webalizer.conf?
You mean "what if there is already a user configured
/etc/webalizer.conf?" (Oh, all right, I am being nit picky)
Remco> Now the user gets asked to fill in the
Remco> new values, though that isn't necessairy when upgrading. It
Remco> just needs to be asked when installing.
Remco> How do I do that?
Easy. Create a variable of something like this:
CONFIGURED="Not Yet"
And while doing your sed magic, either remove the line, or
replace "Not Yet" by "Yes" (I would prefer the first). Then, do
nothing unless you find the line /^CONFIGURED=\"Not Yet\"/.
manoj
--
"A free society is one where it is safe to be unpopular." Adlai
Stevenson
Manoj Srivastava <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
--
To UNSUBSCRIBE, email to debian-mentors-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: