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

Re: debconf question



>>>>> " " == Klaus Reimer <kay@debian.org> writes:

     > Hi, I am planning to package a software which is a PHP
     > module. The Author has already created an unofficial debian
     > package and I want to maintain this package and include it into
     > debian. The package is currently asking three questions in
     > postinst, to do the following things:

     > 1. Add extension-entry in php.ini 2. Add an alias-entry in
     > apache's httpd.conf 3. Restart apache

     > prerm ist asking to do the following

     > 1. Remove extension-entry from php.ini 2. Remove alias-entry in
     > apache's httpd.conf 3. Restart apache.

     > I want to change these questions to use debconf, but I have
     > some problems with them:

     > The package has currently only been used with apache, but I am
     > sure, it is possible to use it with other webservers. Currently
     > in postinst is checked, if httpd.conf is installed and if this
     > is true, the question ist asked and the action is
     > performed. How to do this with debconf? Checking for httpd.conf
     > in the config script (where the questions are asked) AND in the
     > postinst script (Where the answers are processed and the
     > actions are performed)?

Just check exactly like the package does now. The config, postinst/rm
and preinst/rm scripts are all shell scripts, so you can do an exit 0
if the file is not there.

PS: You might be intrested in "hooks", so when apache is installed
later, then the questions will get asked. (but thats under
developement for dpkg)



Reply to: