Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Situation: I'm trying to build a custom rpm to place a config file in a particular location. The installation completes fine by placing config files in proper directories but the %post section is not working. This section echoes user to make an input and 'reads' it. This read value is to be placed in those config files with help of 'sed'.

Issue: 'read' is not working in the %post section ie. the installation process does not wait for user to provide input. It basically completes the installation by placing files in the directories. In short, the %post section is not being interactive for user to provide input.

Please see the SPEC file here: http://pastebin.com/5BgkJUpG . This will help to get the idea.

I wrote the exact same lines of %post section above for "postint" section while building a .deb package and it worked fine there. User installing the deb package was able to make the input and this given value was placed in the config file with 'sed'.

share|improve this question
Don't do this. Use a real configuration management tool such as puppet or chef. – Michael Hampton Sep 24 '12 at 22:02

From the Fedora RPM Guide:


Do not try to write interactive scripts. Many users install RPMs automatically. In such cases, or if the user runs a graphical RPM tool, any information your scripts output will be lost. User input will not be available.

share|improve this answer
Thanks for clearing this up! – user492160 Sep 24 '12 at 20:29

Your Answer


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.