[repo-coord] rpm scripts for daemons, advice please

Bent Terp Bent.Terp at biosci.ki.se
Mon Jul 19 09:53:04 CEST 2004


Hi friends!

I'm working on packaging Torque, a batch queue system, and have received
some feedback I don't agree with.

>  Don't stop daemons (at least, not when upgrading),

Is that normal? To keep version X of a daemon running and in memory,
while version X+1 is on disk?

Would it be wrong to stop the service in %preun, and resume it in %post?
There will be a short disruption of service while files are being
replaced, but it sort of makes sense to me that while it is undefined
which version of files are in place, we don't really want to use them.

Or should I just leave it running and do either a start or a restart in
%post?

I thought the scripts were applied like this:

rpm --install: %pre, install, %post
rpm --erase: %preun, erase, %postun
rpm --upgrade: old %preun, erase, old %postun, new %pre install, new
%post.

But this isn't spelled out in explicit detail in the RPM Guide, and
given my very limited experience, I may well have gotten it all
upside-down.


-- 
/Benty




More information about the repo-coord mailing list