# *-*-shell-*-*
#
case ${ACTION} in
post)
	# Set permissions for auth_pam_tool_dir which contains a suid binary
	chmod 700 usr/lib/mysql/plugin/auth_pam_tool_dir
	chown mysql usr/lib/mysql/plugin/auth_pam_tool_dir
	if [ "$UPDATE" = "no" ] &&  [ ! -f var/lib/mysql/mysql-bin.index ]; then
		chpst -u mysql:mysql usr/bin/mysql_install_db --user=mysql --basedir=/usr \
				--datadir=/var/lib/mysql --rpm --cross-bootstrap
	fi
	;;
esac
