arpwatch/rc.arpwatch

Wed, 14 Jan 2009 15:59:12 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 14 Jan 2009 15:59:12 +0100
changeset 86
78e7deb1d6ab
child 571
175768f4868b
permissions
-rw-r--r--

Correct and improve many buildconf and code logic blocks. In particular:
1. Document potential problems building with current binutils releases.
2. Document the flawed webkit and explain its temporary exclusion.
3. Document the edition of Qt which is built and installed.
4. Remove the Solaris x11_supdir logic as it is no longer found.
5. Correct several .pr[io] files including QMAKE_CXXFLAGS and INCPATH,
which previously caused preexisting Qt installations to deliver
erroneous old include and library logic instead of relying on
that of the currently building package. -I/opkg/include is now
placed at the end of the compile statements.
6. Don't trust the QMAKE_[INC|LIB]DIR_X11 identifiers in qmake.conf.
7. Allow more 64-bit builds and more properly identify the platform.
8. Place plugins (which are shared objects) in lib instead of share.
9. Build components as plugins when possible if with_shared is enabled.
10. Translate German text to English to be more consistent.
11. Instead of removing the pkgconfig directory of with_shared builds,
place it in a child directory useful for shared building.
12. Document the nonstandard shared build directory structure,
including using the hidden pkgconfig directory (PKG_CONFIG_PATH.)
13. Change %doc to specify files rather than directories in the RPM DB.

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

mercurial