|
Home > Archive > Red Hat RPM > January 2005 > How to enter values during the rpm -i and use them in the postinstall process
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to enter values during the rpm -i and use them in the postinstall process
|
|
|
| All,
1. I understand that I can use prefix to define the installation location. I
have done that in my spec file. Thanks.
2. I would like to do the following on top of using --prefix for locating
the installation directory,
"rpm -i software_a.rpm STRING1 STRING2"
STRING1 and STRING2 are just string variables.
3. "Could you please explain your need more clearly and reasoning behind it.
Remember rpm installs are meant to be non-interactive and can be done via
the api/depsolver bypassing the command line."
I would like to be able to doing something in the postinstall section of the
spec file such as:
"echo $STRING1"
"echo $STRING2"
Of course, I will do more than just echo, but having the abilities to do
echo meaning I can use those strings however I want during the postinstall
process. Essentially, STRING1 can be a servername, and the postinstall
section of the spec file needs to process this servername or start processes
with this string.
4. "James' reply covered this thoroughly please reread, currently passing
parameters to scriptlets is unspupported. Bleeding edge work is being done
one this but you can not do this at the moment with any released version of
rpm."
So, nobody actually pass parameters, values while doing "rpm -i"??? How does
one able to do what I want to do in their installation? I am sure that it is
not uncommon to do it, am i right?
5. If I cannot pass the values from the "rpm -i" command, then how can i
assign STRING1 and STRING2 during the installation? Prompts in postinstall
part of the spec file?
Thanks and please advice.
Barry
barry@goodconsultants.com
| |
| ryan_lemos 2005-01-24, 2:57 am |
| quote: Originally posted by Baz
All,
1. I understand that I can use prefix to define the installation location. I
have done that in my spec file. Thanks.
2. I would like to do the following on top of using --prefix for locating
the installation directory,
"rpm -i software_a.rpm STRING1 STRING2"
STRING1 and STRING2 are just string variables.
3. "Could you please explain your need more clearly and reasoning behind it.
Remember rpm installs are meant to be non-interactive and can be done via
the api/depsolver bypassing the command line."
I would like to be able to doing something in the postinstall section of the
spec file such as:
"echo $STRING1"
"echo $STRING2"
Of course, I will do more than just echo, but having the abilities to do
echo meaning I can use those strings however I want during the postinstall
process. Essentially, STRING1 can be a servername, and the postinstall
section of the spec file needs to process this servername or start processes
with this string.
4. "James' reply covered this thoroughly please reread, currently passing
parameters to scriptlets is unspupported. Bleeding edge work is being done
one this but you can not do this at the moment with any released version of
rpm."
So, nobody actually pass parameters, values while doing "rpm -i"??? How does
one able to do what I want to do in their installation? I am sure that it is
not uncommon to do it, am i right?
5. If I cannot pass the values from the "rpm -i" command, then how can i
assign STRING1 and STRING2 during the installation? Prompts in postinstall
part of the spec file?
Thanks and please advice.
Barry
barry@goodconsultants.com
6. I had to do something similar - used environment variables to pass in values. |
|
|
|
|