On Sun, 7 Mar 2004, Baz wrote: > All, > > How can I do the followings during the installation: > > rpm -i package.rpm -D/opt/mydirectory -Nservername > > How can i take inputs -D/opt/mydirectory and -Nservername into the > postinstall process? How can I script the postinstall part of the spec file? > If I understand you correctly, you want to change the behavior of scriplets based on "variables" that are given at install time. One way that would be nice to be able to do this is by scriptlets being evaluated at install time, and then you could use "--define 'key value'" when installing as set of rpms. Presently, though, that is not supported in rpm (though there is work on making this happen...think real bleeding edge). So, what you are left with then are means external to rpm to communicate this "state info" to your scriptlets. You can use environent various, though I don't advise it. Or you could, better, have your scriptlet read in some file that is supposed to be on the system that contains this information. If your using bash for your interpreter of your scriptlets then this "config" file, and simply be a script that gets sourced in. This would then mean that something would have to happen before rpm is called to create this config file; the means is up to your and your needs (vi, script wrapper around rpm that generates it, some UI, ect.). Bottom line is you can get there, but you have to have control of the scriptlets (i.e. be able to change them and rebuild the RPM's), and you will have to solve the problem external to rpm (unless I am wrong, and I am sure someone will let me know if that is the case (-;). Cheers...james _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list