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

Upgrading a package containing daemon executables.



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 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





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