rpm scripts for daemons, advice please
Bent Terp <[email protected]> Mon, 19 Jul 2004 09:53:04 +0200
| Newsgroups | gmane.linux.redhat.rpm.atrpms.repo-coordination |
|---|---|
| Organization | Bioinformatics and Expression Analysis Core Facility, Karolinska Institute |
| Message-ID | <1090223584.8681.110.camel@latte> |
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