On Tue, 2005-07-12 at 16:54 +0530, Manga Padmaja wrote: > Hi, > > I am installing rpm using "rpm -i --prefix /var/opt/sun rpmname" . Rpm > installation uses correct prefix value while installing. > But, during postinstall and pre uninstall, the given prefix value is > discarded and default value is taken. > > Is there a way i can store the prefix value and use in post/pre install > sections. To use the prefix in post the environment variables exist for each prefix used: RPM_INSTALL_PREFIX0 ... RPM_INSTALL_PREFIXn See also here: http://www.redhat.com/archives/rpm-list/2004-March/msg00041.html Paul