summaryrefslogtreecommitdiff
path: root/misc/rpm/INSTALL
blob: f5b1799e9143c432dda6f8cc86653f7e77451450 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
#
# $NetBSD: INSTALL,v 1.1 2001/11/01 01:29:26 zuntum Exp $
#

PKGNAME=$1
STAGE=$2

MKDIR="@MKDIR@"

RPM=${PKG_PREFIX}/bin/rpm
RPMDIR=/var/pkg/lib/rpm

case ${STAGE} in
PRE-INSTALL)
	;;

POST-INSTALL)
	${MKDIR} ${RPMDIR}
	if ! ${RPM} -qa 2>/dev/null
	then
		echo "${PKGNAME}: initializing the RPM database..."
		${RPM} --initdb
	fi
	;;

*)
	echo "Unexpected argument ${STAGE}"
	exit 1
	;;
esac
exit 0