openldap/rc.openldap

Sun, 03 Apr 2011 13:34:55 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 03 Apr 2011 13:34:55 +0200
changeset 337
f71e028eb3e2
permissions
-rw-r--r--

Correct and improve several packaging aspects including...
Correct datadir path for python modules, correct jar(1) path for
building libgcj classes, strip libexecdir path of version numbers,
improve name of oblbld build path, clean whitespace from as(1) and
ld(1) GNU detection, remove seemingly discarded '--with-local-prefix'
configure argument, and correct hardcoded lto plugin libtool archive
dependency information.

Most importantly, correct IA32 architecture detection logic in
config.gcc to correctly emit SSE2 instructions conditionally, leading
to the removal of all '-march' bootstrap options and replacement with
unconditional (for IA32/AMD64) '-mtune=native' options. Comments and
buildtime warnings are corrected appropriately. In theory these changes
cause a more portable, orthoganal, and optimal bootstrap to be built.

     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

mercurial