2001-10-11 13:42:26 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2001-11-01 01:11:36 +01:00
|
|
|
# $NetBSD: INSTALL,v 1.1 2001/11/01 00:11:41 zuntum Exp $
|
2001-10-11 13:42:26 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
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
|