arpwatch/rc.arpwatch

Sat, 03 Oct 2009 16:18:52 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Oct 2009 16:18:52 +0200
changeset 220
a6cd892638c1
child 571
175768f4868b
permissions
-rw-r--r--

Update version, adjust corresponding buildconf, and correct logic.
1: Make minor corrections and improvements to scripts patch logic.
2: Upgrade to most recent stable release version 3.0.2.
3: Force selection of a single db backend, as multiple ones never
were supported (changing 'with_db<end>' identifiers accordingly.)
4: Unfortunately add gawk requirement although only partly needed.
5: Add openssl::with_threads requirement to solve strange and hard
to debug problems on Solaris leading to connection failures:

'host-dir JobId 0: Error: openssl.c:86 Connect failure: ERR=error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number'

and

'host-dir JobId 40: Fatal error: TLS negotiation failed with FD at "back1.host.com:9102"'

     1 #!@l_prefix@/bin/openpkg rc
     2 ##
     3 ##  rc.arpwatch -- runcommands
     4 ##
     6 %config
     7     arpwatch_enable="$openpkg_rc_def"
     8     arpwatch_log_prolog="true"
     9     arpwatch_log_epilog="true"
    10     arpwatch_log_numfiles="10"
    11     arpwatch_log_minsize="1M"
    12     arpwatch_log_complevel="9"
    13     arpwatch_iface="-i lo0"
    14     arpwatch_ipnet="-n 127.0.0.0/8"
    16 %common
    17     arpwatch_pidfile="@l_prefix@/var/arpwatch/run/arpwatch.pid"
    18     arpwatch_signal () {
    19         [ -f $arpwatch_pidfile ] && kill -$1 `cat $arpwatch_pidfile`
    20     }
    22 %status -u @l_susr@ -o
    23     arpwatch_usable="no"
    24     arpwatch_active="no"
    25     rcService arpwatch enable yes && \
    26         arpwatch_usable="yes"
    27     rcService arpwatch enable yes && \
    28         arpwatch_signal 0 && arpwatch_active="yes"
    29     echo "arpwatch_enable=\"$arpwatch_enable\""
    30     echo "arpwatch_usable=\"$arpwatch_usable\""
    31     echo "arpwatch_active=\"$arpwatch_active\""
    33 %start -u @l_susr@
    34     rcService arpwatch enable yes || exit 0
    35     rcService arpwatch active yes && exit 0
    36     @l_prefix@/sbin/arpwatch \
    37         $arpwatch_iface \
    38         $arpwatch_ipnet \
    39         >$arpwatch_pidfile 2>&1
    41 %stop -u @l_susr@
    42     rcService arpwatch enable yes || exit 0
    43     rcService arpwatch active no && exit 0
    44     arpwatch_signal TERM
    46 %restart -u @l_susr@
    47     rcService arpwatch enable yes || exit 0
    48     rcService arpwatch active no && exit 0
    49     rc arpwatch stop
    50     sleep 2
    51     rc arpwatch start
    53 %reload -u @l_susr@
    54     rcService arpwatch enable yes || exit 0
    55     rcService arpwatch active no && exit 0
    56     arpwatch_signal HUP
    58 %daily -u @l_susr@
    59     rcService arpwatch enable yes || exit 0
    60     shtool rotate -f \
    61         -n ${arpwatch_log_numfiles} -s ${arpwatch_log_minsize} -d \
    62         -z ${arpwatch_log_complevel} -o @l_susr@ -g @l_mgrp@ -m 644 \
    63         -P "${arpwatch_log_prolog}" \
    64         -E "${arpwatch_log_epilog}; rc arpwatch restart" \
    65         @l_prefix@/var/arpwatch/log/arpwatch.log \
    66         @l_prefix@/var/arpwatch/log/arpsnmp.log

mercurial