Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 7ea45bfe602f8e7ee8e01a1fe287ec2c > scriptlet

anonftp-3.0-37mdv2010.0.i586.rpm

PREUN

/bin/sh
if [ -f /etc/ftpaccess ];then
		grep -q class  /etc/ftpaccess && grep -v class /etc/ftpaccess > /etc/ftpaccess.mdk
		if [ "$?" = "0" ];then		
				mv -f /etc/ftpaccess.mdk /etc/ftpaccess
		fi
fi
exit 0

POSTIN

/bin/sh
if [ -f /etc/ftpaccess ];then
		if ! grep -q "class.*anonymous.*"  /etc/ftpaccess;then
		cat /etc/ftpaccess | grep -v class > /etc/ftpaccess.mdk
		echo "class all real,guest,anonymous  *" > /etc/ftpaccess
		cat /etc/ftpaccess.mdk >> /etc/ftpaccess
		rm -f /etc/ftpaccess.mdk
		fi
fi
exit 0