preinst is in arpwatch 2.1a15-1.2.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #!/bin/sh
# arpwatch.preinst: v4 2004/08/14 KELEMEN Peter <fuji@debian.org>
set -e
NAME=arpwatch
DBDIR=/var/lib/$NAME
DBFILE=arp.dat
BACKUPDIR=/var/backups
# Back up collected ARP databases.
if [ -d $DBDIR -a -d $BACKUPDIR ]; then
if [ -d $BACKUPDIR/$NAME ]; then
rm -r $BACKUPDIR/$NAME
fi
cp -rp $DBDIR $BACKUPDIR/$NAME
fi
|