PREIN
/bin/sh
if [ -n "`/usr/bin/getgid utmp`" ]; then
if [ "`/usr/bin/getgid utmp`" != "22" ]; then
echo "Error: group utmp doesn't have gid=22. Correct this before installing utempter." 1>&2
exit 1
fi
else
echo "Adding group utmp GID=22."
/usr/sbin/groupadd -g 22 -r utmp 1>&2 || exit $?
[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group || :
fi;
POSTIN
/bin/sh
/sbin/ldconfig
if [ ! -f /var/run/utmpx ]; then
umask 002
touch /var/run/utmpx
chown root:utmp /var/run/utmpx
chmod 0664 /var/run/utmpx
fi
POSTUN
/bin/sh
/sbin/ldconfig
if [ "$1" = "0" ]; then
/usr/lib/rpm/user_group.sh group del utmp
fi