- Use fixed UID/GID

This commit is contained in:
Pav Lucistnik 2004-05-30 08:01:22 +00:00
parent 8ae1c82f7b
commit 612b1aca5a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=110386

View File

@ -5,6 +5,8 @@ PREFIX=${PKG_PREFIX:-%%PREFIX%%}
CLAMAVUSER=%%CLAMAVUSER%%
CLAMAVGROUP=%%CLAMAVGROUP%%
UID=106
GID=$UID
CLAMRUN=/var/run/clamav
CLAMLOG=/var/log/clamav
@ -13,7 +15,7 @@ DATADIR=%%DATADIR%%
if [ "$2" = "PRE-INSTALL" ]; then
if ! pw groupshow "$CLAMAVGROUP" 2>/dev/null 1>&2; then
if pw groupadd $CLAMAVGROUP; then
if pw groupadd $CLAMAVGROUP -g $GID; then
echo "=> Added group \"$CLAMAVGROUP\"."
else
echo "=> Adding group \"$CLAMAVGROUP\" failed..."
@ -22,7 +24,7 @@ if [ "$2" = "PRE-INSTALL" ]; then
fi
if ! pw usershow "$CLAMAVUSER" 2>/dev/null 1>&2; then
if pw useradd $CLAMAVUSER -g $CLAMAVGROUP -h - \
if pw useradd $CLAMAVUSER -u $UID -g $CLAMAVGROUP -h - \
-s "/sbin/nologin" -d "/nonexistent" \
-c "Clam Antivirus"; \
then