Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am writing a debian package and need to prompt the user for some textual details(default password, etc), as well as some one-of-many choices("Pick one of the following: foo, bar"). Will shell scripts run in dpkg use read or select correctly, or do I need another solution? If so, please point me to a quick guide about it(not necessarily noob-friendly).

share|improve this question
    
@UlrichDangel Could you add an asnwer so I can accept it? –  hexafraction Jun 29 '12 at 18:53
    
@UlrichDangel A Stackoverflow meta search turns up results that they are on topic here. –  hexafraction Jun 29 '12 at 19:18

1 Answer 1

up vote 5 down vote accepted

You should not use read, select or dialog yourself but use debconf instead which supports readline, dialog, gtk and even web frontends. This is much more flexible than your own system. If you are using dh for building your system it will automatically use dh_installdebconf and you'll just have to place your template in debian/package.config and don't have to adjust/modify your debian/rules file or postinst script.

For a short introduction into debconf have a look at The Debconf Programmer's Tutorial.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.