Getting realocated dir in the postinstall (or other) scriptlets ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, 

I'm working on an RPM package that deploys files to /opt and /etc. In most of the cases it works perfectly, excepted that for a given environment, where writing to /etc is prohibited  ....

So I used Relocations in order to deploy the /etc files in some other location :

   Relocations : /opt /etc

By specifying --relocate option I can deploy the /etc files into another location :

   rpm -ivh --relocate /etc=/my/path/to/etc mypackage.rpm

Now the issue is that in the postinstall script, there are some hard coded references to /etc that obviously don't get replaced when the package is deployed :

   echo `hostname --fqdn` > /etc/myapp/host.conf
   ( this is just an example ) 

I hope that there is a way (keyword, ... ) to use instead of hard coded paths in order to perform the substitutions during rpm execution. 

If you have any information on this I'd really appreciate some help.

Thanks per advance
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list



[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux