3
# preflight - this script will be executed before the MySQL PKG
4
# installation will be performed.
6
# If this package has been compiled with a prefix ending with "mysql" (e.g.
7
# /usr/local/mysql or /opt/mysql), it will rename any previously existing
8
# directory with this name before installing the new package (which includes
9
# a symlink named "mysql", pointing to the newly installed directory, which
10
# is named mysql-<version>)
14
BASENAME=`basename $PREFIX`
16
if [ -d $PREFIX -a ! -L $PREFIX -a $BASENAME = "mysql" ] ; then
17
mv $PREFIX $PREFIX.bak