Operating System - Linux
1822146 Members
4174 Online
109640 Solutions
New Discussion юеВ

passing parameters to rpms

 
SOLVED
Go to solution
ovedwish
Occasional Contributor

passing parameters to rpms

Hey,

I want to create a rpm that creates a Filesystem, and puts the files in that specific filesystem....

I want that the vg name will be passed while installation...

Is it possible to define parameters in a spec file of rpm, and when installing to set the parameter, and the rpm will act according to the value ? (in my case creating a fs on the vg according to the vg parameter).

Thank you,
Oved
3 REPLIES 3
Stuart Browne
Honored Contributor
Solution

Re: passing parameters to rpms

Short answer: No. You can only pass parameters during the rpm's build phase.

Not-so-short answer: Maybe. If you populate a file somewhere (fixed) on one of the existing filesystems, and have your built RPM use the contents of that existing file, then you should be able to get something done. So long as it's not going to ask any questions that is.
One long-haired git at your service...
Gopi Sekar
Honored Contributor

Re: passing parameters to rpms


you may be able to do this as per stuart's response.

Other method would be to set an environment variable, check for this environment variable from pre-install script of RPM package install. Based on the value do some pre-install actions (creating vg, vg parameters etc). Then do the actual installation.

Check RPM spec file for pre-install and post-install scripts. There are also options for pre and post uninstall scripts.

Regards,
Gopi
Never Never Never Giveup
Tvs
Regular Advisor

Re: passing parameters to rpms

hai

Try to cretae a kick start installation.

after installing in one system take a kick start config file( this option is available in the gui mode)and copy the ks.conf file to a floppy
and in the other system boot with the bootable cd and put the floppy in the fdd
and give

boot: ks=floppy


cheers