PREIN
/bin/sh
if [ -n "`/usr/bin/getgid cvs`" ]; then
if [ "`/usr/bin/getgid cvs`" != "52" ]; then
echo "Error: group cvs doesn't have gid=52. Correct this before installing cvs." 1>&2
exit 1
fi
else
echo "Adding group cvs GID=52."
/usr/sbin/groupadd -g 52 -r cvs 1>&2 || exit $?
[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group || :
fi;
if [ -n "`/bin/id -u cvs 2>/dev/null`" ]; then
if [ "`/bin/id -u cvs`" != "52" ]; then
echo "Error: user cvs doesn't have uid=52. Correct this before installing cvs." 1>&2
exit 1
fi
else
echo "Adding user cvs UID=52."
/usr/sbin/useradd \
\
-u 52 \
-r \
-d /var/lib/cvs \
-s /bin/false \
\
-g cvs \
\
\
cvs 1>&2 || exit $?
[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i passwd || :
fi;
POSTIN
/bin/sh
if [ "$1" = "1" ]; then
# Initialise repository
/usr/bin/cvs -d :local:/var/lib/cvs init
chown -R cvs:cvs /var/lib/cvs/CVSROOT
fi
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/rc-inetd ] && . /etc/sysconfig/rc-inetd
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/rc-inetd ]; then
/sbin/service rc-inetd reload 1>&2 || :;
fi
fi };
POSTUN
/bin/sh
if [ "$1" = "0" ]; then
/usr/lib/rpm/user_group.sh user del cvs
/usr/lib/rpm/user_group.sh group del cvs
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/rc-inetd ] && . /etc/sysconfig/rc-inetd
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/rc-inetd ]; then
/sbin/service rc-inetd reload 1>&2 || :;
fi
fi };fi