Re: How can i enter value during rpm -i and use them during the postinstall process?

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

 



On Mon, 8 Mar 2004, Baz wrote:

> Matthew,
> 
> Thanks for the reply.
> 
> So if I cannot pass values by using "rpm -i software_a.rpm STRING1 STRING2",
> then can i do the following:
> 
> "export STRING="xxx"; export STRING2="yyy"; rpm -i software_a.rpm"
> 
> then in the postinstall section,
> 
> I will do the following:
> 
> "echo ${STRING1}"
> "echo ${STRING2}"
> 
> Will this work instead of the orginal rpm usage then i posted?
>
Yes that will work.  Be careful with environment variables though.  
Mysterious things can happen with them.  I generally prefer to have a file
like:

	STRING="xxx"
	STRING2="yyy"

And then in the scriptlet I source the file in:

	. /path/to/file/with/variable/definitions
	echo $STRING
	echo $STRING2

This was really what originally suggested, without trying to constrain
you to particular implementation details.

Cheers...james 


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/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