2004-04-13 02:54:39 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ "$2" != "PRE-INSTALL" ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
RBLDNSUSER=${RBLDNSUSER:-rbldns}
|
|
|
|
RBLDNSGROUP=${RBLDNSGROUP:-rbldns}
|
|
|
|
|
|
|
|
if ! pw groupshow "$RBLDNSGROUP" 2>/dev/null 1>&2; then
|
|
|
|
if pw groupadd $RBLDNSGROUP; then
|
|
|
|
echo "=> Added group \"$RBLDNSGROUP\"."
|
|
|
|
else
|
|
|
|
echo "=> Adding group \"$RBLDNSGROUP\" failed..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! pw usershow "$RBLDNSUSER" 2>/dev/null 1>&2; then
|
|
|
|
if pw useradd $RBLDNSUSER -g $RBLDNSGROUP -h - \
|
2006-09-22 06:34:41 +02:00
|
|
|
-s "/usr/sbin/nologin" -d "/nonexistent" \
|
2004-04-13 02:54:39 +02:00
|
|
|
-c "rbldnsd pseudo-user"; \
|
|
|
|
then
|
|
|
|
echo "=> Added user \"$RBLDNSUSER\"."
|
|
|
|
else
|
|
|
|
echo "=> Adding user \"$RBLDNSUSER\" failed..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
exit 0
|