diff options
author | Kirill Ponomarev <krion@FreeBSD.org> | 2004-01-19 23:34:48 +0000 |
---|---|---|
committer | Kirill Ponomarev <krion@FreeBSD.org> | 2004-01-19 23:34:48 +0000 |
commit | 486518fcaaa4b373ad28bfaa87b26523a50d9cd2 (patch) | |
tree | f353e6fbb8a862121294775d61b335e29d780799 /net/arpwatch-devel/files/arpwatch.sh | |
parent | Add p5-DBI-Shell 11.93, interactive command shell for the DBI. (diff) |
This is a development fork of arpwatch. This has been
threaded in order to better deal with the requirements of
multi-interface routers. Information regarding MAC addresses
and interfaces is maintained by the program, and an alert is
issued should a device move between interfaces. In addition,
event processing has been refactored, and some bugs have been
fixed.
PR: 59180
Submitted by: Matthew George <mdg@secureworks.net>
Approved by: portmgr
Notes
Notes:
svn path=/head/; revision=98614
Diffstat (limited to 'net/arpwatch-devel/files/arpwatch.sh')
-rw-r--r-- | net/arpwatch-devel/files/arpwatch.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/net/arpwatch-devel/files/arpwatch.sh b/net/arpwatch-devel/files/arpwatch.sh index 92035b9eb274..acf46782ce0d 100644 --- a/net/arpwatch-devel/files/arpwatch.sh +++ b/net/arpwatch-devel/files/arpwatch.sh @@ -21,22 +21,29 @@ case $1 in start) if [ ! -e "$PREFIX"/arpwatch/arp.dat ]; then if [ -e "$PREFIX"/arpwatch/arp.dat- ]; then - cp "$PREFIX"/arpwatch/arp.dat- "$PREFIX"/arpwatch/arp.dat + cp "$PREFIX"/arpwatch/arp.dat- "$PREFIX"/arpwatch/arp.dat else touch "$PREFIX"/arpwatch/arp.dat fi fi + if [ ! -e "$PREFIX"/arpwatch/ether.dat ]; then + if [ -e "$PREFIX"/arpwatch/ether.dat- ]; then + cp "$PREFIX"/arpwatch/ether.dat- "$PREFIX"/arpwatch/ether.dat + else + touch "$PREFIX"/arpwatch/ether.dat + fi + fi + case ${arpwatch_interfaces} in '') if [ -x "$PREFIX"/sbin/arpwatch -a -d "$PREFIX"/arpwatch ]; then - "$PREFIX"/sbin/arpwatch && echo -n ' arpwatch' + "$PREFIX"/sbin/arpwatch ${arpwatch_flags} && echo -n ' arpwatch' fi ;; *) for interface in ${arpwatch_interfaces}; do - touch "$PREFIX"/arpwatch/arp.${interface}.dat - "$PREFIX"/sbin/arpwatch -i "${interface}" -f arp.${interface}.dat && echo -n " arpwatch(${interface})" + "$PREFIX"/sbin/arpwatch -i "${interface}" && echo -n " arpwatch(${interface})" done ;; esac |