Re: postinstall script question

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

 



James, and all,

Thank you for your reply.

I guess you did answer but not into details. Here is what i want:

1. I would like to install software_a.rpm with command "rpm -i
software_a.rpm -D/opt/mydirectory -Nservername". Where the
"/opt/mydirectory" is a string indicate the installation directory.
"servername" is a string value. Both values will be used during postinstall
process.

2. In the postinstall section of the spec file. I can do something such as
"echo $INSTALLDIR" and "echo $SERVERNAME". How can i pass the -D and -N flag
values into the postinstall script?

Thanks.

Barry


----- Original Message ----- 
From: "James Olin Oden" <joden@xxxxxxxxxxxxx>
To: <rpm-list@xxxxxxxxxx>
Sent: Sunday, March 07, 2004 6:17 PM
Subject: Re: postinstall script question


> On Sun, 7 Mar 2004, Baz wrote:
>
> > All,
> >
> > How can I do the followings during the installation:
> >
> > rpm -i package.rpm -D/opt/mydirectory -Nservername
> >
> > How can i take inputs -D/opt/mydirectory and -Nservername into the
> > postinstall process? How can I script the postinstall part of the spec
file?
> >
> If I understand you correctly, you want to change the behavior of
> scriplets based on "variables" that are given at install time.  One way
> that would be nice to be able to do this is by scriptlets being evaluated
> at install time, and then you could use "--define 'key value'" when
> installing as set of rpms.  Presently, though, that is not supported in
> rpm (though there is work on making this happen...think real bleeding
> edge).
>
> So, what you are left with then are means external to rpm to communicate
> this "state info" to your scriptlets.  You can use environent various,
> though I don't advise it.  Or you could, better, have your scriptlet
> read in some file that is supposed to be on the system that contains this
> information.  If your using bash for your interpreter of your scriptlets
> then this "config" file, and simply be a script that gets sourced in.
> This would then mean that something would have to happen before rpm
> is called to create this config file; the means is up to your and your
> needs (vi, script wrapper around rpm that generates it, some UI, ect.).
>
> Bottom line is you can get there, but you have to have control of the
> scriptlets (i.e. be able to change them and rebuild the RPM's), and you
> will have to solve the problem external to rpm (unless I am wrong, and I
> am sure someone will let me know if that is the case (-;).
>
> Cheers...james
>
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/rpm-list
>



_______________________________________________
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