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

Re: RFH: postfix-policyd using dbconfig-common and ucf



hi ondrej,

sorry for the delay, just got back from vacation :)

On Fri, Aug 12, 2005 at 02:03:16PM +0200, Ondrej Sury wrote:
> DATABASE:
> It seems that I can use dbconfig-common for database changes, I have
> slight idea how to implement it, but there are some questions about it:
> 
> - can it handle databases on another host - server
>   (it's not uncommon to not have database on main server or have more
>    mail servers using same database)

it has the same level of support for remote databases as it does for
local databases, though you will need to make sure that there is a
remotely accessible administrative account that can do the necessary
grants/etc for the accounts/databases used by the package.

however, if you have multiple servers each with this package and they
are all using the same central database, you might have some trouble
with performing database upgrades if each package tries to perform
the same upgrade on the same database.  in such a case, you can get
around it simply by answering "no" to the "perform automatic upgrade"
debconf question.

> - how do I handle situation where old version is not based on
> dbconfig-common and I have to handle both situations: new installs and
> upgrades from that old version.  I guess I can use some postinst magick?
> Like case $1; do configure)) ... esac.

there's support for this.  read the dbconfig-common-using document[1]
and it should tell you what you need to do.  there's also an alioth
mailing list for discussing dbconfig-common if you're interested[2].

> CONFIG:
> Config file is kept in /etc/postfix-policyd.conf.
> 
> I need to accomplish several things:
> 
> - add new stuff to config file based on which version I am upgrading
> from.
> 
> - integrate with dbconfig-common, ie. set MYSQL{HOST,USER,PASS,DBASE}

this is also possible, again check the previously mentioned docs.
look for 'dbconfig-generate-include' and 'dbconfig-load-include'
(or read the fine manpages).  if the conf file is a complicated or
arbitrary format, there's a feature in cvs youmight be interested
in (contact me on the alioth list to hear more about that if necessary)


	sean


-- 
[1] /usr/share/doc/dbconfig-common/dbconfig-common-using.html
[2] dbconfig-common-devel@lists.alioth.debian.org

Attachment: signature.asc
Description: Digital signature


Reply to: