openldap/rc.openldap

Sat, 24 Mar 2012 21:40:49 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 24 Mar 2012 21:40:49 +0100
changeset 414
fd611cde817f
permissions
-rw-r--r--

Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.

michael@174 1 #!@l_prefix@/bin/openpkg rc
michael@174 2 ##
michael@174 3 ## rc.openldap -- Run-Commands
michael@174 4 ##
michael@174 5
michael@174 6 %config
michael@174 7 openldap_enable="$openpkg_rc_def"
michael@174 8 openldap_flags=""
michael@174 9 openldap_url="ldap://127.0.0.1:389/"
michael@174 10 openldap_log_prolog="true"
michael@174 11 openldap_log_epilog="true"
michael@174 12 openldap_log_numfiles="10"
michael@174 13 openldap_log_minsize="1M"
michael@174 14 openldap_log_complevel="9"
michael@174 15
michael@174 16 %common
michael@174 17 openldap_slapd_cfgfile="@l_prefix@/etc/openldap/slapd.conf"
michael@174 18 openldap_slapd_pidfile="@l_prefix@/var/openldap/run/slapd.pid"
michael@174 19 openldap_slapd_signal () {
michael@174 20 [ -f $openldap_slapd_pidfile ] && kill -$1 `cat $openldap_slapd_pidfile`
michael@174 21 }
michael@174 22
michael@174 23 %status -u @l_susr@ -o
michael@174 24 openldap_usable="unknown"
michael@174 25 openldap_active="no"
michael@174 26 rcService openldap enable yes && \
michael@174 27 openldap_slapd_signal 0 && openldap_active="yes"
michael@174 28 echo "openldap_enable=\"$openldap_enable\""
michael@174 29 echo "openldap_usable=\"$openldap_usable\""
michael@174 30 echo "openldap_active=\"$openldap_active\""
michael@174 31
michael@174 32 %start -p 300 -u @l_susr@
michael@174 33 rcService openldap enable yes || exit 0
michael@174 34 openldap_slapd_signal 0
michael@174 35 if [ $? -ne 0 ]; then
michael@174 36 flags="$openldap_flags"
michael@174 37 echo $flags | grep -- -h >/dev/null
michael@174 38 if [ $? -ne 0 -a ".$openldap_url" != . ]; then
michael@174 39 flags="$flags -h \"$openldap_url\""
michael@174 40 fi
michael@174 41 eval @l_prefix@/libexec/openldap/slapd $flags || exit $?
michael@174 42 fi
michael@174 43
michael@174 44 %stop -p 700 -u @l_susr@
michael@174 45 rcService openldap enable yes || exit 0
michael@174 46 rcService openldap active no && exit 0
michael@174 47 openldap_slapd_signal INT
michael@174 48 sleep 2
michael@174 49
michael@174 50 %restart -u @l_susr@
michael@174 51 rcService openldap enable yes || exit 0
michael@174 52 rcService openldap active no && exit 0
michael@174 53 rc openldap stop start
michael@174 54
michael@174 55 %daily -u @l_susr@
michael@174 56 rcService openldap enable yes || exit 0
michael@174 57 shtool rotate -f \
michael@174 58 -n ${openldap_log_numfiles} -s ${openldap_log_minsize} -d \
michael@174 59 -z ${openldap_log_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \
michael@174 60 -P "${openldap_log_prolog}" \
michael@174 61 -E "${openldap_log_epilog}; rc openldap restart" \
michael@174 62 @l_prefix@/var/openldap/openldap.log
michael@174 63

mercurial