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

Re: Upgrading a package containing daemon executables.



--- Srinivas BC <srinivas_98@hotmail.com> wrote:
> I am trying to upgrade a package which has
> executables. In SVR 4 to upgrade 
> a package I have class action scripts which would do
> what I need. That is to 
> say when we overwrite a daemon which is being used
> we will get EBUSY error.
> 
> class action script does the following things :
> 1. Move the daemon executable file to some other
> path name.
> 2. Copy the new (or upgrading file) file from
> package to target system.
> 3. remove the moved path name.
> 
> In SVR 4 we used to install the daemon file using
> the class action script at 
> installation time.
> 
> In rpm I believe there is no way to use scripts at
> installation time. Hence 
There is a way.
You can use pre/post install/uninstall scripts.
I.e, you can in preinstall script (%pre)
move your running daemon away,
and in postinstall script (%post)
remove it.

Valery

> I actually would install the file e.g. daemon
> executable file 
> /usr/bin/daemonprogram as /usr/bin/daemonprogram.sav
> (to avoid rpm install 
> trying to overwrite the daemon file and fail with
> the error) by  changing 
> the %files section of spec file. Later in
> postinstall section of spec file I 
> would apply what my class action script in SVR 4
> used to do (move the file, 
> copy etc. )
> 
> That leaves me with 1 problem. The rpm commands
> query - "rpm -q" and verify 
> - "rpm -v" would  show the installed file as
> /usr/bin/daemonprogram.sav 
> instead of  /usr/bin/daemonprogram. What I am
> thinking is to update the 
> database to change the file name to
> /usr/bin/daemonprogram. Is it possible 
> for me to modify the header of an rpm in the
> database by using rpmlib and Is 
> it advisable to do that ? Could you please give some
> directions or thoughts 
> to address either the problem created by my original
> problem or is there a 
> way to attack the original problem itself ?
> 
> Any feedback and help will help me a lot. Thanks for
> any suggestions !!
> 
> srini.
> 
>
_________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months
> FREE*.  
> http://join.msn.com/?page=features/virus
> 
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com
> https://www.redhat.com/mailman/listinfo/rpm-list


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com




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