[Rpm-maint] post/preun scripts and updating

Lenz, Mario (LDS) Mario.Lenz at lds.nrw.de
Tue May 29 13:04:44 UTC 2007


Hi!

I'm not sure if this is the correct mailing list, but I
havn't found anything else. Maybe you can point me to
somewhere where I get help if I'm wrong here :-)

I've tried to build my own rpm package with a postinstall
script that starts the daemon that is part of it (chkconfig 
mydaemon on; /etc/init.d/mydaemon start) and a preuninstall
script to stop it (chkconfig mydaemon off; /etc/init.d/mydaemon
 stop). But if I build a new rpm and run an update, the daemon is
turned off. It looks to me that the preun- script of the old
package ist run *after* the post- script of the new one. So
of course the daemon is turned off. So there are two questions:

1) Am I right? If so, I could stop searching for errors I made
in the spec- file.
2) How could I do what I want: Start a daemon when installing
and stop it when deinstalling, but "update- proof".

Oh: It's a SLES10 system running RPM 4.4.2.

greez

   Mario



More information about the Rpm-maint mailing list