dovecot/rc.dovecot

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
parent 148
f6edc24e328f
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.dovecot -- Run-Commands
     4 ##
     6 %config
     7     dovecot_enable="$openpkg_rc_def"
     8     dovecot_log_prolog="true"
     9     dovecot_log_epilog="true"
    10     dovecot_log_numfiles="10"
    11     dovecot_log_minsize="1M"
    12     dovecot_log_complevel="9"
    13     dovecot_deliver_log_prolog="true"
    14     dovecot_deliver_log_epilog="true"
    15     dovecot_deliver_log_numfiles="10"
    16     dovecot_deliver_log_minsize="1M"
    17     dovecot_deliver_log_complevel="9"
    19 %common
    20     dovecot_pidfile="@l_prefix@/var/dovecot/run/master.pid"
    21     dovecot_signal () {
    22         [ -f $dovecot_pidfile ] && kill -$1 `cat $dovecot_pidfile`
    23     }
    25 %status -u @l_susr@ -o
    26     dovecot_usable="unknown"
    27     dovecot_active="no"
    28     rcService dovecot enable yes && \
    29         dovecot_signal 0 && dovecot_active="yes"
    30     echo "dovecot_enable=\"$dovecot_enable\""
    31     echo "dovecot_usable=\"$dovecot_usable\""
    32     echo "dovecot_active=\"$dovecot_active\""
    34 %start -u @l_susr@
    35     rcService dovecot enable yes || exit 0
    36     rcService dovecot active yes && exit 0
    37     @l_prefix@/sbin/dovecot
    39 %stop -u @l_susr@
    40     rcService dovecot enable yes || exit 0
    41     rcService dovecot active no  && exit 0
    42     dovecot_signal TERM
    43     sleep 2
    44     rm -f $dovecot_pidfile >/dev/null 2>&1 || true
    46 %restart -u @l_susr@
    47     rcService dovecot enable yes || exit 0
    48     rcService dovecot active no  && exit 0
    49     rc dovecot stop start
    51 %reload -u @l_susr@
    52     rcService dovecot enable yes || exit 0
    53     rcService dovecot active no  && exit 0
    54     dovecot_signal HUP
    56 %daily -u @l_susr@
    57     rcService dovecot enable yes || exit 0
    58     rcTmp -i
    59     hintfile=`rcTmp -f -n hint`
    60     shtool rotate -f \
    61         -n ${dovecot_log_numfiles} -s ${dovecot_log_minsize} -d \
    62         -z ${dovecot_log_complevel} -m 600 -o @l_susr@ -g @l_sgrp@ \
    63         -P "${dovecot_log_prolog}" \
    64         -E "${dovecot_log_epilog}; echo 1 >$hintfile" \
    65         @l_prefix@/var/dovecot/log/dovecot.log
    66     if [ -s $hintfile ]; then
    67         dovecot_signal USR1
    68     fi
    69     rcTmp -k
    70     shtool rotate -f \
    71         -n ${dovecot_deliver_log_numfiles} -s ${dovecot_deliver_log_minsize} -d \
    72         -z ${dovecot_deliver_log_complevel} -m 600 -o @l_rusr@ -g @l_rgrp@ \
    73         -P "${dovecot_deliver_log_prolog}" \
    74         -E "${dovecot_deliver_log_epilog}" \
    75         @l_prefix@/var/dovecot/log/deliver.log

mercurial