ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Michael Shigorin <mike@osdn.org.ua>
To: sisyphus@lists.altlinux.org
Cc: incoming@altlinux.org, homyakov@altlinux.org, inger@altlinux.org
Subject: [sisyphus] NMU: arpwatch, monit
Date: Thu, 19 Jan 2006 14:27:29 +0200
Message-ID: <20060119122729.GB20937@osdn.org.ua> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 563 bytes --]

	Здравствуйте.
У меня есть два подготовленных NMU -- arpwatch и monit.
Последний я бы забрал вообще, поскольку применяю и обновляю
для себя (см. тж. backports).

В arpwatch добавлена поддержка sysconfig file для передачи
параметров (например, интерфейс, на котором слушать).
Спек/инитскрипт прилагаю.

arpwatch взведён на дополнительном сервере -- работает,
monit (правда, 4.6, но апстрим не склонен ломать всё подряд)
-- на двух боевых дежурствах.

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/

[-- Attachment #1.2: arpwatch.spec --]
[-- Type: text/plain, Size: 3198 bytes --]

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 <mike@altlinux.org> 2:2.1a13-alt1.1
- NMU: add sysconfig support
- spec cleanup

* Mon Mar 01 2004 Stanislav Ievlev <inger@altlinux.org> 2:2.1a13-alt1
- 2.1a13

* Thu Nov 13 2003 Stanislav Ievlev <inger@altlinux.org> 2:2.1a11-alt6
- new init script

* Wed Nov 27 2002 Stanislav Ievlev <inger@altlinux.ru> 2:2.1a11-alt5
- fix deps on csh

* Mon Nov 18 2002 Stanislav Ievlev <inger@altlinux.ru> 2:2.1a11-alt4
- rebuild
- use {post/preun}_server macros

* Wed May 15 2002 Dmitry V. Levin <ldv@altlinux.org> 2:2.1a11-alt3
- Updated dependencies (smtpdaemon --> MTA).

* Tue Apr 09 2002 Dmitry V. Levin <ldv@alt-linux.org> 2:2.1a11-alt2
- Rebuilt with libpcap-0.7.1.
- Updated dependencies.

* Fri Jan 04 2002 Rider <rider@altlinux.ru> 2.1a11-alt1
- 2.1a11

* Tue Jan 09 2001 Dmitry V. Levin <ldv@fandra.org> 2.1a10-ipl2mdk
- Rebuilt with libpcap-0.6.1.

* Tue Oct 17 2000 Dmitry V. Levin <ldv@fandra.org> 2.1a10-ipl1mdk
- 2.1a10
- Split from tcpdump.

[-- Attachment #1.3: arpwatch.init --]
[-- Type: text/plain, Size: 1041 bytes --]

#! /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

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2006-01-19 12:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-19 12:27 Michael Shigorin [this message]
2006-01-19 13:54 ` Andrei Bulava
2006-01-19 19:49   ` [sisyphus] Re: NMU: monit Michael Shigorin
2006-01-19 20:43     ` Igor Zubkov
2006-01-19 20:47       ` Michael Shigorin
2006-01-19 23:29       ` Aleksey Avdeev
2006-01-20 10:42         ` Igor Zubkov
2006-01-20 12:16           ` Aleksey Avdeev
2006-01-27 13:04       ` [sisyphus] I: monit-4.7-alt3 Michael Shigorin
2006-01-20  8:04     ` [sisyphus] NMU: monit Andrei Bulava
2006-01-20 17:30       ` Andrei Bulava
2006-01-25 13:04     ` [sisyphus] " Nick S. Grechukh
2006-01-20 14:59 ` [sisyphus] Re: NMU: arpwatch, monit Stanislav Ievlev
2006-01-27 13:28   ` [sisyphus] I: arpwatch-2.1a13-alt1.1 Michael Shigorin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060119122729.GB20937@osdn.org.ua \
    --to=mike@osdn.org.ua \
    --cc=homyakov@altlinux.org \
    --cc=incoming@altlinux.org \
    --cc=inger@altlinux.org \
    --cc=shigorin@gmail.com \
    --cc=sisyphus@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git