Cyrus 2.1 and 2.2 init scripts

Ross Boylan ross at biostat.ucsf.edu
Mon Oct 16 20:38:15 UTC 2006


On Mon, 2006-10-16 at 16:11 -0400, Benjamin Seidenberg wrote:
> Ross Boylan wrote:
> > I upgraded my system from Cyrus 2.1 to 2.2 awhile ago.  It looks to me
> > as if the init script for Cryus 2.1 is still active, because it checks
> > for the existence of cyrmaster.
> >
> > Since 2.1 and 2.2 basically do the same thing, invoking cyrmaster, I'm
> > not sure this is a problem, but it looks odd.
> >
> > Is this behavior intended, have I misunderstood something, or is this
> > worth filing a bug about?
> >
> > Thanks.
> >   
> As I understand it, this is according to policy. The init script is 
> considered a conf file, and is preserved on package removal. Since you 
> didn't purge the package, the file stays.

The thing that seems problematic is not that the init script remains,
but that it remains active--it does something when it is invoked.  Most
init scripts test for some file that is only in the package, so  that
when the package is removed the script becomes a no-op.  In this case,
the key lines are
DAEMON=/usr/sbin/cyrmaster
test -x ${DAEMON} || exit 0

The same 2 lines occur in both the 2.1 and 2.2 init scripts.  The file
being tested is not unique to a particular package:
# apt-file search cyrmaster
cyrus-common-2.2: usr/sbin/cyrmaster
cyrus-common-2.2: usr/share/man/man8/cyrmaster.8.gz
cyrus21-common: usr/sbin/cyrmaster
cyrus21-common: usr/share/man/man8/cyrmaster.8.gz
kolab-cyrus-common: usr/sbin/cyrmaster
kolab-cyrus-common: usr/share/man/man8/cyrmaster.8.gz

It looks as if cyrus2.2 sorts before cyrus21 alphabetically, so my guess
is that cyrus2.2 runs first (the init script, that is) and then
cyrus21's start-stop-daemon discovers something is already running and
does nothing.  Even in that optimistic case, there is other code in
init.d/cyrus21 that gets executed.
-- 
Ross Boylan                                      wk:  (415) 514-8146
185 Berry St #5700                               ross at biostat.ucsf.edu
Dept of Epidemiology and Biostatistics           fax: (415) 514-8150
University of California, San Francisco
San Francisco, CA 94107-1739                     hm:  (415) 550-1062




More information about the Pkg-Cyrus-imapd-Debian-devel mailing list