Sophie

Sophie

distrib > PLD > ra > i686 > by-pkgid > a44e7ac6cbe3adcd0ae997a7ea7c57a3 > scriptlet

cvs-pserver-1.11.2-6.i686.rpm

PREIN

/bin/sh
if [ "$1" = 1 ]; then
	# Add user and group
	getgid cvs >/dev/null 2>&1 || /usr/sbin/groupadd -f -g 52 cvs
	id -u cvs >/dev/null 2>&1 || /usr/sbin/useradd -g cvs -m -d /home/cvsroot -u 52 -s /bin/false cvs 2>/dev/null
fi

POSTIN

/bin/sh
if [ "$1" = 1 ]; then
	# Initialise repository
	/usr/bin/cvs -d :local:/home/cvsroot init
	chown -R cvs.cvs /home/cvsroot/CVSROOT
fi
if [ -f /var/lock/subsys/rc-inetd ]; then
	/etc/rc.d/init.d/rc-inetd reload
fi

POSTUN

/bin/sh
if [ "$1" = "0" ]; then
	# Remove user and group
	/usr/sbin/userdel cvs 2>/dev/null
	/usr/sbin/groupdel cvs 2>/dev/null
	if [ -f /var/lock/subsys/rc-inetd ]; then
		/etc/rc.d/init.d/rc-inetd reload
	fi
fi