arpwatch package will now install an arp.dat file, meaning arpwatch from

the package will work by default.

Additionally, setting arpwatch_interfaces in the rc.conf system will
allow you to specify which interfaces arpwatches will run on.  By
default (ie, variable empty or not set), it will run on the first
non-local interface it finds.

Approved by:	brian (thanks!)
This commit is contained in:
Neil Blakey-Milner 2001-08-23 14:45:02 +00:00
parent 11c04b6c86
commit fe5a0493bd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=46714
12 changed files with 116 additions and 12 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= arpwatch
PORTVERSION= 2.1.a11
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/

View File

@ -1,5 +1,12 @@
#!/bin/sh
if [ -r /etc/defaults/rc.conf ]; then
. /etc/defaults/rc.conf
source_rc_confs
elif [ -r /etc/rc.conf ]; then
. /etc/rc.conf
fi
prog=$(realpath $0) || exit 1
dir=${prog%/*}
PREFIX=${dir%/etc/rc.d}
@ -12,9 +19,26 @@ fi
case $1 in
start)
if [ -x "$PREFIX"/sbin/arpwatch -a -d "$PREFIX"/arpwatch ]; then
"$PREFIX"/sbin/arpwatch && echo -n ' arpwatch'
if [ ! -e "$PREFIX"/arpwatch/arp.dat ]; then
if [ -e "$PREFIX"/arpwatch/arp.dat- ]; then
cp "$PREFIX"/arpwatch/arp.dat- "$PREFIX"/arpwatch/arp.dat
else
touch "$PREFIX"/arpwarch/arp.dat
fi
fi
case ${arpwatch_interfaces} in
'')
if [ -x "$PREFIX"/sbin/arpwatch -a -d "$PREFIX"/arpwatch ]; then
"$PREFIX"/sbin/arpwatch && echo -n ' arpwatch'
fi
;;
*)
for interface in ${arpwatch_interfaces}; do
"$PREFIX"/sbin/arpwatch -i "${interface}" && echo -n " arpwatch(${interface})"
done
;;
esac
;;
stop)
killall arpwatch && echo -n ' arpwatch'

View File

@ -1,10 +1,11 @@
sbin/arpwatch
sbin/arpsnmp
@unexec test -f %D/arpwatch/arp.dat && test -s %D/arpwatch/arp.dat || rm -f %D/arpwatch/arp.dat
arpwatch/arp2ethers
arpwatch/ethercodes.dat
arpwatch/d.awk
arpwatch/e.awk
arpwatch/p.awk
etc/rc.d/arpwatch.sh
@unexec test -f %D/arpwatch/arp.dat && test -s %D/arpwatch/arp.dat || rm -f %D/arpwatch/arp.dat
@exec test -f %D/arpwatch/arp.dat || touch %D/arpwatch/arp.dat
@dirrm arpwatch

View File

@ -7,6 +7,7 @@
PORTNAME= arpwatch
PORTVERSION= 2.1.a11
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/

View File

@ -1,5 +1,12 @@
#!/bin/sh
if [ -r /etc/defaults/rc.conf ]; then
. /etc/defaults/rc.conf
source_rc_confs
elif [ -r /etc/rc.conf ]; then
. /etc/rc.conf
fi
prog=$(realpath $0) || exit 1
dir=${prog%/*}
PREFIX=${dir%/etc/rc.d}
@ -12,9 +19,26 @@ fi
case $1 in
start)
if [ -x "$PREFIX"/sbin/arpwatch -a -d "$PREFIX"/arpwatch ]; then
"$PREFIX"/sbin/arpwatch && echo -n ' arpwatch'
if [ ! -e "$PREFIX"/arpwatch/arp.dat ]; then
if [ -e "$PREFIX"/arpwatch/arp.dat- ]; then
cp "$PREFIX"/arpwatch/arp.dat- "$PREFIX"/arpwatch/arp.dat
else
touch "$PREFIX"/arpwarch/arp.dat
fi
fi
case ${arpwatch_interfaces} in
'')
if [ -x "$PREFIX"/sbin/arpwatch -a -d "$PREFIX"/arpwatch ]; then
"$PREFIX"/sbin/arpwatch && echo -n ' arpwatch'
fi
;;
*)
for interface in ${arpwatch_interfaces}; do
"$PREFIX"/sbin/arpwatch -i "${interface}" && echo -n " arpwatch(${interface})"
done
;;
esac
;;
stop)
killall arpwatch && echo -n ' arpwatch'

View File

@ -1,10 +1,11 @@
sbin/arpwatch
sbin/arpsnmp
@unexec test -f %D/arpwatch/arp.dat && test -s %D/arpwatch/arp.dat || rm -f %D/arpwatch/arp.dat
arpwatch/arp2ethers
arpwatch/ethercodes.dat
arpwatch/d.awk
arpwatch/e.awk
arpwatch/p.awk
etc/rc.d/arpwatch.sh
@unexec test -f %D/arpwatch/arp.dat && test -s %D/arpwatch/arp.dat || rm -f %D/arpwatch/arp.dat
@exec test -f %D/arpwatch/arp.dat || touch %D/arpwatch/arp.dat
@dirrm arpwatch

View File

@ -7,6 +7,7 @@
PORTNAME= arpwatch
PORTVERSION= 2.1.a11
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/

View File

@ -1,5 +1,12 @@
#!/bin/sh
if [ -r /etc/defaults/rc.conf ]; then
. /etc/defaults/rc.conf
source_rc_confs
elif [ -r /etc/rc.conf ]; then
. /etc/rc.conf
fi
prog=$(realpath $0) || exit 1
dir=${prog%/*}
PREFIX=${dir%/etc/rc.d}
@ -12,9 +19,26 @@ fi
case $1 in
start)
if [ -x "$PREFIX"/sbin/arpwatch -a -d "$PREFIX"/arpwatch ]; then
"$PREFIX"/sbin/arpwatch && echo -n ' arpwatch'
if [ ! -e "$PREFIX"/arpwatch/arp.dat ]; then
if [ -e "$PREFIX"/arpwatch/arp.dat- ]; then
cp "$PREFIX"/arpwatch/arp.dat- "$PREFIX"/arpwatch/arp.dat
else
touch "$PREFIX"/arpwarch/arp.dat
fi
fi
case ${arpwatch_interfaces} in
'')
if [ -x "$PREFIX"/sbin/arpwatch -a -d "$PREFIX"/arpwatch ]; then
"$PREFIX"/sbin/arpwatch && echo -n ' arpwatch'
fi
;;
*)
for interface in ${arpwatch_interfaces}; do
"$PREFIX"/sbin/arpwatch -i "${interface}" && echo -n " arpwatch(${interface})"
done
;;
esac
;;
stop)
killall arpwatch && echo -n ' arpwatch'

View File

@ -1,10 +1,11 @@
sbin/arpwatch
sbin/arpsnmp
@unexec test -f %D/arpwatch/arp.dat && test -s %D/arpwatch/arp.dat || rm -f %D/arpwatch/arp.dat
arpwatch/arp2ethers
arpwatch/ethercodes.dat
arpwatch/d.awk
arpwatch/e.awk
arpwatch/p.awk
etc/rc.d/arpwatch.sh
@unexec test -f %D/arpwatch/arp.dat && test -s %D/arpwatch/arp.dat || rm -f %D/arpwatch/arp.dat
@exec test -f %D/arpwatch/arp.dat || touch %D/arpwatch/arp.dat
@dirrm arpwatch

View File

@ -7,6 +7,7 @@
PORTNAME= arpwatch
PORTVERSION= 2.1.a11
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/

View File

@ -1,5 +1,12 @@
#!/bin/sh
if [ -r /etc/defaults/rc.conf ]; then
. /etc/defaults/rc.conf
source_rc_confs
elif [ -r /etc/rc.conf ]; then
. /etc/rc.conf
fi
prog=$(realpath $0) || exit 1
dir=${prog%/*}
PREFIX=${dir%/etc/rc.d}
@ -12,9 +19,26 @@ fi
case $1 in
start)
if [ -x "$PREFIX"/sbin/arpwatch -a -d "$PREFIX"/arpwatch ]; then
"$PREFIX"/sbin/arpwatch && echo -n ' arpwatch'
if [ ! -e "$PREFIX"/arpwatch/arp.dat ]; then
if [ -e "$PREFIX"/arpwatch/arp.dat- ]; then
cp "$PREFIX"/arpwatch/arp.dat- "$PREFIX"/arpwatch/arp.dat
else
touch "$PREFIX"/arpwarch/arp.dat
fi
fi
case ${arpwatch_interfaces} in
'')
if [ -x "$PREFIX"/sbin/arpwatch -a -d "$PREFIX"/arpwatch ]; then
"$PREFIX"/sbin/arpwatch && echo -n ' arpwatch'
fi
;;
*)
for interface in ${arpwatch_interfaces}; do
"$PREFIX"/sbin/arpwatch -i "${interface}" && echo -n " arpwatch(${interface})"
done
;;
esac
;;
stop)
killall arpwatch && echo -n ' arpwatch'

View File

@ -1,10 +1,11 @@
sbin/arpwatch
sbin/arpsnmp
@unexec test -f %D/arpwatch/arp.dat && test -s %D/arpwatch/arp.dat || rm -f %D/arpwatch/arp.dat
arpwatch/arp2ethers
arpwatch/ethercodes.dat
arpwatch/d.awk
arpwatch/e.awk
arpwatch/p.awk
etc/rc.d/arpwatch.sh
@unexec test -f %D/arpwatch/arp.dat && test -s %D/arpwatch/arp.dat || rm -f %D/arpwatch/arp.dat
@exec test -f %D/arpwatch/arp.dat || touch %D/arpwatch/arp.dat
@dirrm arpwatch