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

Re: How best to handle upgrade of Cyrus spool?



Michael-John Turner <mj@turner.org.za> writes:

> Cyrus 2.x requires a new spool dir hierarchy and a script exists to migrate
> from earlier releases (this would be run from postinst). The problem is
> that the the user's MTA needs to be shut down _before_ this migration
> process starts, [...]

Using the preinst would be fine, no? Packaging manual 6.3 gives the
datails about what is called when. You can also look at things like
postgresql that also need to migrate data on upgrade.

The real puzzler IMHO is how to determine which MTA is installed to
call the right /etc/init.d file. Is there a programatic way to do
this? I can only come up with either

  apt-get install mail-transfer-agent + some sed magic

or

  grep-status -sPackage -FProvides mail-transport-agent

but these depend on non-essential packages. Hmm, what about

  dpkg -S /usr/sbin/sendmail

? Everything that provides m-t-a, also has this file/symlink. That's a
hack, sure, but a quite reliable one ... The grep-status would be the
cleanest, though.

-- 
Robbe

Attachment: signature.ng
Description: PGP signature


Reply to: