summaryrefslogtreecommitdiff
path: root/mail/popa3d/pkg/INSTALL
blob: a3c727190cdd6d68275e205b8c7c56041eba80a0 (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
33
34
35
36
# $NetBSD: INSTALL,v 1.1.1.1 2000/04/02 01:32:28 wiz Exp $
#

if [ "$2" != "PRE-INSTALL" ]; then
    chown popa3d:popa3d ${PKG_PREFIX}/libexec/popa3d
    exit 0
fi

if [ -f /usr/sbin/user ]
then
    USER_CMD=/usr/sbin/user
    GROUP_CMD=/usr/sbin/group
else
    if [ -f ${PKG_PREFIX}/sbin/user ]
    then
	USER_CMD=${PKG_PREFIX}/sbin/user
	GROUP_CMD=${PKG_PREFIX}/sbin/group
    else
	echo
	echo Please install the sysutils/user first!
	echo
	exit 0
    fi
fi

if ${GROUP_CMD} info -e popa3d ; then \
	${ECHO} Group \'popa3d\' already exists.; \
else \
	${GROUP_CMD} add popa3d; \
fi
if ${USER_CMD} info -e popa3d ; then \
	${ECHO} User \'popa3d\' already exists.; \
else \
	${USER_CMD} add -g popa3d -d /nonexistent -s /sbin/nologin \
		popa3d; \
fi