Sophie

Sophie

distrib > Mandriva > 9.0 > x86_64 > media > main > by-pkgid > 47d9275021d38631aa3864954a3556da > scriptlet

MySQL-3.23.53-6mdk.x86_64.rpm

PREIN

/bin/sh
if test -x /etc/rc.d/init.d/mysql
then
  /etc/rc.d/init.d/mysql stop > /dev/null 2>&1
  sleep 5
fi

/usr/share/rpm-helper/add-user MySQL $1 mysql /var/lib/mysql /bin/bash

PREUN

/bin/sh
if [ $1 = 0 ]; then
    service mysql stop >/dev/null
fi

/usr/share/rpm-helper/del-service MySQL $1 mysql 
# We do not remove the mysql user since it may still own a lot of
# database files.
if [ "$1" = "0" ]; then if [[ -f /usr/share/info/mysql.info.bz2 ]];then /sbin/install-info /usr/share/info/mysql.info.bz2 --dir=/usr/share/info/dir --remove ;fi; fi

POSTIN

/bin/sh
if [[ -f /usr/share/info/mysql.info.bz2 ]];then /sbin/install-info /usr/share/info/mysql.info.bz2 --dir=/usr/share/info/dir;fi 

/usr/share/rpm-helper/add-service MySQL $1 mysql 

# Initiate databases
su - mysql -c "mysql_install_db -IN-RPM" > /dev/null

# Restart in the same way that mysqld will be started normally.
if [ $1 = 0 ]; then
        /etc/rc.d/init.d/mysql start
fi

# Allow safe_mysqld to start mysqld and print a message before we exit
sleep 2