Sat, 21 May 2011 22:05:42 +0200
Correct diverse buildconf of upstream release and reconcile packaging somewhat.
These changes stem from the obvious changes in the latest vendor release, but
from discussions with trolls Daniel and Oswald as well regarding build config.
This commital follows conclusion of buildconf adjustments to allow the new
vendor version to build on Linux AMD64, but is incomplete as many packaging
comments show. The next series of changes focus on Solaris IA32 and reduction
of buildconf adjustments testing old problems comprehensively in anticipation
of discussion at the upcoming Nokia Contributor Summit in Berlin.
1 #!@l_prefix@/bin/openpkg rc
2 ##
3 ## rc.openldap -- Run-Commands
4 ##
6 %config
7 openldap_enable="$openpkg_rc_def"
8 openldap_flags=""
9 openldap_url="ldap://127.0.0.1:389/"
10 openldap_log_prolog="true"
11 openldap_log_epilog="true"
12 openldap_log_numfiles="10"
13 openldap_log_minsize="1M"
14 openldap_log_complevel="9"
16 %common
17 openldap_slapd_cfgfile="@l_prefix@/etc/openldap/slapd.conf"
18 openldap_slapd_pidfile="@l_prefix@/var/openldap/run/slapd.pid"
19 openldap_slapd_signal () {
20 [ -f $openldap_slapd_pidfile ] && kill -$1 `cat $openldap_slapd_pidfile`
21 }
23 %status -u @l_susr@ -o
24 openldap_usable="unknown"
25 openldap_active="no"
26 rcService openldap enable yes && \
27 openldap_slapd_signal 0 && openldap_active="yes"
28 echo "openldap_enable=\"$openldap_enable\""
29 echo "openldap_usable=\"$openldap_usable\""
30 echo "openldap_active=\"$openldap_active\""
32 %start -p 300 -u @l_susr@
33 rcService openldap enable yes || exit 0
34 openldap_slapd_signal 0
35 if [ $? -ne 0 ]; then
36 flags="$openldap_flags"
37 echo $flags | grep -- -h >/dev/null
38 if [ $? -ne 0 -a ".$openldap_url" != . ]; then
39 flags="$flags -h \"$openldap_url\""
40 fi
41 eval @l_prefix@/libexec/openldap/slapd $flags || exit $?
42 fi
44 %stop -p 700 -u @l_susr@
45 rcService openldap enable yes || exit 0
46 rcService openldap active no && exit 0
47 openldap_slapd_signal INT
48 sleep 2
50 %restart -u @l_susr@
51 rcService openldap enable yes || exit 0
52 rcService openldap active no && exit 0
53 rc openldap stop start
55 %daily -u @l_susr@
56 rcService openldap enable yes || exit 0
57 shtool rotate -f \
58 -n ${openldap_log_numfiles} -s ${openldap_log_minsize} -d \
59 -z ${openldap_log_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \
60 -P "${openldap_log_prolog}" \
61 -E "${openldap_log_epilog}; rc openldap restart" \
62 @l_prefix@/var/openldap/openldap.log