[Kolab-devel] kolabctl instead of kolabsrv

Richard Bos ml at radoeka.nl
Mon Oct 11 21:33:31 CEST 2010

Op maandag 11 oktober 2010 12:14:24 schreef Jeroen van Meeuwen (Kolab 
> - kolabsrv assumes all applications related to kolab are installed on the 
> local host, which of course is not necessarily true. It's not acceptable
>  to  have to change the code of the script to make the script work in
>  certain deployment scenarios;
> - kolabsrv will fail in case any of such applications are not installed on
>  the  local host, which of course requires change to the code of the script
>  to make it work in certain deployment scenarios;

The script contains this:
# Some distributions run / control the services clamav and freshclam from
# amavisd.  The services can be unset in @sysconfdir@/kolab/profile.sh,
# when unset, they are not called obviously.

[[ -f /etc/kolab/profile.sh ]] && . /etc/kolab/profile.sh

If other services than clamav or freshclam or to be skipped add the necessary 
variables to it, so it is possible.

What the script accomplish, is that depending on the check spam/virus in the 
web GUI, clamav and freshclam are started or not started.  So, if you extend 
this, you could specify in the web GUI what service you want to run for ldap, 
MTA, and whatever.

> - kolabsrv maintains lists of applications and service names per
>  distribution,  resulting in the following downsides;
>   - it's not providing the necessary option value to use a different ldap 
> technology,
>   - it's not providing the necessary option value to not have ldap, or
>  AS/AV,  or MTA, or (...), installed on the backend server,

See above.

(to what are you referring with AS/AV)

>   - with changes being made across distributions, we'd have to make changes
>  to  the script that go across distributions as well,

I don't see what you mean.

>   - when changes are being made in between one released version of a 
> distribution, and the following released version of a distribution, the
>  script  would require additional intelligence to take into account not
>  only the distribution, but the distribution version as well;

Just provide a different @sysconfdir@/kolab/profile.sh with your rpm.

> - kolabsrv is a wrapper utility, and should therefor be called 'control'
>  or  'ctl'. The 'srv' part merely applies to the kolab daemon itself;

Rename the script in the spec file to whatever name is appreciated by the 

> - kolabsrv.in results in a generated script which then also draws it's own 
> conclusions; this is inappropriate because part of the script's execution
>  is  now subject to compile-time, and part of it's execution is subject to
>  it's runtime; it's easy enough to make that be runtime only to avoid
>  support issues with the script resulting in having to rebuild anything;

Do you mean this part:
 22 function rcrun() {
 23         $RCDIR/$SERVICE $PARAM
 24         retc=$?
 25         if [ $retc -ne 0 ] && [ $retc -ne 3 ]; then
 26                 ( echo "ERROR: $RCDIR/$SERVICE $PARAM failed"
 27                   echo "Run: $PRGNAME rc all stop"
 28                   echo "to stop all services"
 29                 ) >&2
 30                 exit 1
 31         fi
 32 }

That is LSB compliant, that should be a no problem.

> - kolabsrv / kolabctl is a utility, because it is a wrapper script, and as 
> such is not part of the kolab server per-se, nor of the perl-Kolab library.
>  It  should, therefor, live in a kolab-utils type of location; which we do
>  not have right now.
> Similarly, in relation to the latter point, many of the bin/ and sbin/ 
> utilities now still a part of the perl-Kolab library location in the SCM,
>  are  actually utilities as well. To say the least, the perl-Kolab perl
>  library should be cleaned out and only contain the parts of the code that
>  actually relate to the perl library. However, that's besides the $subject
>  in this OP for now;
> I've made available a general, conceptual idea of what a kolabctl script
>  could  look like in HG;
>   http://hg.kolab.org/server/file/fdb4dec37808/kolabd/kolabd/dist_conf/kola
> bctl
> Noted that 1) the simple lists are not complete in this version, but I'm
>  not  allowed to continue to work on it because apparently it confuses some
>  people, 
>  2) some intelligence might be added provided a more intelligent
>  configuration management framework / utility -which is an entirely
>  different realm of changes and outside $subject of this OP as well.

Whatever, you like.  But work with the community please....


More information about the devel mailing list