Question

I am creating a sample debian package, where i need to get the user input which is a number , usually all the user input is taken in postinst script, it would be simple for me if i use simple read command to get what i want,

Is is mandatory to use debconf like creating templates then config script and using db_get from postinst as in deconf tutorial

Can any tell me why to use the above complex process instead of using simple read command.

Was it helpful?

Solution

There is no requirement, but debconf does a lot of work for you which you would have to do manually if you don't take advantage of it. For example:

  • You will have to manage the priority of your question manually so that you ask it only if the user has asked to be prompted for information at your question's priority level or greater and supply a default otherwise.
  • You will have to figure out if the package is being initially installed, reinstalled, or upgraded, so that you don't, for example, ask your question during an upgrade (the user has presumably already answered it during the installation).
  • You will have to figure out what kind of user interface is available and prompt using readline, curses, or another method, depending on how the system is configured and what is available.

Are you still sure you want to reject debconf?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top