File: postinst

package info (click to toggle)
arpwatch 2.1a4-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 572 kB
  • ctags: 233
  • sloc: ansic: 2,467; sh: 1,723; makefile: 140; awk: 61
file content (21 lines) | stat: -rw-r--r-- 459 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# KELEMEN Peter <fuji@debian.org>
# postinst maintainer script for arpwatch

set -e

# Attempt to save ethernet/ip database from 2.1a4-1.

DBFILE=arp.dat
OLDDIR=/var/run/arpwatch
NEWDIR=/var/lib/arpwatch

if [ -s $OLDDIR/$DBFILE ]; then
	cp $OLDDIR/$DBFILE $NEWDIR
fi

# If arp.dat doesn't exist, it creates an empty one.  This way upgrades are
# not going to destroy already collected database content.
touch /var/lib/arpwatch/arp.dat

#DEBHELPER#