Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-testing > by-pkgid > 1e81ea0d706bf1c7e0c49a8767c7e8bc > scriptlet

mysql-5.0.51a-8mdv2008.1.x86_64.rpm

PREUN

/bin/sh
if [ -x /usr/sbin/mysqld-max -o -x /etc/rc.d/init.d/mysqld-max ]; then
    chkconfig --del mysqld-max
else
    /usr/share/rpm-helper/del-service mysql $1 mysqld 
fi

POSTIN

/bin/sh
# Change permissions so that the user that will run the MySQL daemon
# owns all needed files.
chown -R mysql:mysql /var/lib/mysql /var/run/mysqld /var/log/mysqld

# make sure the /var/lib/mysql directory can be accessed
chmod 711 /var/lib/mysql

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

POSTUN

/bin/sh
if [ "$1" = "0" ]; then
    if [ -f /var/lock/subsys/mysqld -o -f /var/lock/subsys/mysqlmanager ]; then
        /etc/rc.d/init.d/mysqld restart 1>&2
    fi
fi

Triggers

MySQL < 4.1.10

/bin/sh
if [ -f /var/lock/subsys/mysql ]; then
    pidname="/var/lib/mysql/`/bin/hostname`.pid"
    if [ -f ${pidname} ]; then
	kill `cat ${pidname}`
	/etc/rc.d/init.d/mysqld start
    fi
fi