blob: 23145633ddcbad5045da8af133770a5766765775 (
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
37
38
39
40
|
#!/bin/sh
#
# $NetBSD: INSTALL,v 1.1 2001/11/01 00:11:41 zuntum Exp $
#
PKGNAME=$1
STAGE=$2
USER="@USER@"
GROUP="@GROUP@"
PREFIX="@PREFIX@"
ADDUSER="@ADDUSER@"
ADDGROUP="@ADDGROUP@"
ID="@ID@"
MKDIR="@MKDIR@"
case ${STAGE} in
PRE-INSTALL)
${ID} ${USER} >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo "User '${USER}' already exists...proceeding."
else
echo "Creating '${USER}' user..."
${MKDIR} ${PREFIX}/share/gnats/gnats-db
${ADDUSER} -c "GNATS database owner" -g ${GROUP} -s /bin/sh \
-d ${PREFIX}/share/gnats/gnats-db ${USER}
echo "Done."
fi
;;
POST-INSTALL)
;;
*)
echo "Unexpected argument: ${STAGE}"
exit 1
;;
esac
exit 0
|