response file mechanism for RPMs
I'm migrating my Sun Solaris packages to rpm redhat.
During the installation of a Solaris package it's possible to specify a so-called response file, which allows to set variables during the installation of the package.
The Solaris pkgadd
command looks e.g. like that one
pkgadd -开发者_运维知识库r myresponse.txt -d mypackage.pkg
Is there a similar mechanism for RPMs.
The RedHat Package Manager strongly separates the concept of installation and configuration. Basically, RPM only does the installation part.
While it is possible for RPM to do a lot more than simple installation, whatever it does is required by convention to be non-interactive. Otherwise, the installation will fail in the many non-interactive ways that RPMs get installed. You probably don't want the typical RPM package breaking all of the automated software updating tools (like yum, up2date, etc). While developing, you might install RPMs by hand, but many shops put RPMs on a web server for consumption by cron assisted yum updates.
Now if you really want to do it anyway, then put a post-installation hook to launch the configuration program. However, be warned that you might not have a graphics system to display any GUI items, and in some severe cases, you might not even have a console to print out text. Also, expect to piss off those who install the package, as it will be the only package that behaves different.
Migrating a system is a little more than just making it work on the new platform, sometimes it's best to adapt to the new platform's way of doing things too.
精彩评论