From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 20 Jan 2006 17:59:17 +0300 From: Stanislav Ievlev To: sisyphus@lists.altlinux.org, incoming@altlinux.org, homyakov@altlinux.org, inger@altlinux.org Message-ID: <20060120145917.GB18986@basalt.office.altlinux.org> References: <20060119122729.GB20937@osdn.org.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20060119122729.GB20937@osdn.org.ua> Cc: Subject: [sisyphus] Re: NMU: arpwatch, monit X-BeenThere: sisyphus@lists.altlinux.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Linux Sisyphus discussion list List-Id: ALT Linux Sisyphus discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2006 14:59:17 -0000 Archived-At: List-Archive: List-Post: Мои бери. On Thu, Jan 19, 2006 at 02:27:29PM +0200, Michael Shigorin wrote: > Здравствуйте. > У меня есть два подготовленных NMU -- arpwatch и monit. > Последний я бы забрал вообще, поскольку применяю и обновляю > для себя (см. тж. backports). > > В arpwatch добавлена поддержка sysconfig file для передачи > параметров (например, интерфейс, на котором слушать). > Спек/инитскрипт прилагаю. > > arpwatch взведён на дополнительном сервере -- работает, > monit (правда, 4.6, но апстрим не склонен ломать всё подряд) > -- на двух боевых дежурствах. > > -- > ---- WBR, Michael Shigorin > ------ Linux.Kiev http://www.linux.kiev.ua/ > Name: arpwatch > Version: 2.1a13 > Release: alt1.1 > Serial: 2 > > Summary: Network monitoring tools for tracking IP addresses on the network. > Summary(ru_RU.KOI8-R): Утилиты для отслеживания соответствия IP адресов в сети. > Group: Monitoring > License: BSD > Url: ftp://ftp.ee.lbl.gov > > Source: %url/%name-%version.tar.bz2 > Source1: %name.init > > Patch1: %name-2.1a4-fhs.patch > Patch2: %name-2.1a10-man.patch > > PreReq(post,preun): chkconfig > Requires: MTA > > # Automatically added by buildreq on Thu Nov 13 2003 > BuildRequires: libpcap-devel > > %description > The %name package contains %name and arpsnmp. Arpwatch and arpsnmp > are both network monitoring tools. Both utilities monitor Ethernet or > FDDI network traffic and build databases of Ethernet/IP address pairs, > and can report certain changes via email. > > Install the %name package if you need networking monitoring devices > which will automatically keep traffic of the IP addresses on your > network. > > %prep > %setup -q > %patch1 -p1 > %patch2 -p1 > > %build > export ac_cv_path_V_SENDMAIL=%_sbindir/sendmail > %configure > %define _vararpwatch %_localstatedir/%name > > %make_build ARPDIR=%_vararpwatch > > %install > mkdir -p %buildroot{%_vararpwatch,%_sbindir,%_man8dir,%_initdir} > mkdir -p %buildroot%_sysconfdir/sysconfig > %make_install DESTDIR=%buildroot install install-man > > install -p -m755 arp2ethers massagevendor %buildroot%_vararpwatch > install -p -m644 *.awk *.dat %buildroot%_vararpwatch > > install -p -m755 %SOURCE1 %buildroot%_initdir/%name > > #%__subst -p 's,#!/bin/csh.*.*,#!/bin/sh,' %buildroot%_vararpwatch/arp2ethers > > cat >> %buildroot%_sysconfdir/sysconfig/%name << EOF > # additional parameters to be passed to arpwatch > # e.g. to listen to particular interface, uncomment/edit this: > #ARPWATCH_ARGS="-i eth1" > EOF > > %post > %post_service %name > > %preun > %preun_service %name > > %files > %_sbindir/* > %_mandir/man?/* > %config(noreplace) %_initdir/%name > %config(noreplace) %_sysconfdir/sysconfig/%name > %dir %_vararpwatch > %config(noreplace) %_vararpwatch/arp.dat > %_vararpwatch/ethercodes.dat > %_vararpwatch/*.awk > %_vararpwatch/arp2ethers > %_vararpwatch/massagevendor > %doc README CHANGES > > %changelog > * Mon Jan 16 2006 Michael Shigorin 2:2.1a13-alt1.1 > - NMU: add sysconfig support > - spec cleanup > > * Mon Mar 01 2004 Stanislav Ievlev 2:2.1a13-alt1 > - 2.1a13 > > * Thu Nov 13 2003 Stanislav Ievlev 2:2.1a11-alt6 > - new init script > > * Wed Nov 27 2002 Stanislav Ievlev 2:2.1a11-alt5 > - fix deps on csh > > * Mon Nov 18 2002 Stanislav Ievlev 2:2.1a11-alt4 > - rebuild > - use {post/preun}_server macros > > * Wed May 15 2002 Dmitry V. Levin 2:2.1a11-alt3 > - Updated dependencies (smtpdaemon --> MTA). > > * Tue Apr 09 2002 Dmitry V. Levin 2:2.1a11-alt2 > - Rebuilt with libpcap-0.7.1. > - Updated dependencies. > > * Fri Jan 04 2002 Rider 2.1a11-alt1 > - 2.1a11 > > * Tue Jan 09 2001 Dmitry V. Levin 2.1a10-ipl2mdk > - Rebuilt with libpcap-0.6.1. > > * Tue Oct 17 2000 Dmitry V. Levin 2.1a10-ipl1mdk > - 2.1a10 > - Split from tcpdump. > #! /bin/sh > # > # chkconfig: - 55 45 > # description: The arpwatch daemon attempts to keep track of ethernet/ip \ > # address pairings. > # processname: arpwatch > WITHOUT_RC_COMPAT=1 > > # Source function library. > . /etc/rc.d/init.d/functions > > unset ARPWATCH_ARGS > > # Get config. > SourceIfNotEmpty /etc/sysconfig/network > SourceIfNotEmpty /etc/sysconfig/arpwatch > > LOCKFILE=/var/lock/subsys/arpwatch > RETVAL=0 > > start() > { > is_yes "$NETWORKING" || return 0 > start_daemon --lockfile "$LOCKFILE" -- arpwatch "$ARPWATCH_ARGS" > RETVAL=$? > return $RETVAL > } > > stop() > { > stop_daemon --lockfile "$LOCKFILE" -- arpwatch > RETVAL=$? > return $RETVAL > } > > restart() > { > stop > start > } > > # See how we were called. > case "$1" in > start) > start > ;; > stop) > stop > ;; > status) > status arpwatch > RETVAL=$? > ;; > restart|reload) > restart > ;; > condstop) > if [ -f "$LOCKFILE" ]; then > stop > fi > ;; > condrestart) > if [ -f "$LOCKFILE" ]; then > restart > fi > ;; > *) > msg_usage "${0##*/} {start|stop|status|restart|reload|condstop|condrestart}" > RETVAL=1 > esac > > exit $RETVAL