PREIN
/bin/sh
if [ -n "`/usr/bin/getgid slocate`" ]; then
if [ "`/usr/bin/getgid slocate`" != "21" ]; then
echo "Error: group slocate doesn't have gid=21. Correct this before installing slocate." 1>&2
exit 1
fi
else
echo "Adding group slocate GID=21."
/usr/sbin/groupadd -g 21 -r slocate 1>&2 || exit $?
[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group || :
fi;
POSTIN
/bin/sh
if [ ! -f /var/lib/slocate/slocate.db ]; then
echo 'Run "/usr/bin/updatedb" if you want to make slocate database immediately.'
fi
POSTUN
/bin/sh
if [ "$1" = "0" ]; then
/usr/lib/rpm/user_group.sh group del slocate
fi