PREIN
/bin/sh
if [ -n "`getgid slocate`" ]; then
if [ "`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 -f slocate
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
echo "Removing group slocate."
/usr/sbin/groupdel slocate
fi