Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-testing > by-pkgid > 9d5c07a3226471cf5cfdeaefcfa5f514 > scriptlet

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

PREUN

/bin/sh
if [ -x /usr/sbin/mysqld -o -x /etc/rc.d/init.d/mysqld ]; then
    chkconfig --del mysqld
else
    /usr/share/rpm-helper/del-service mysql $1 mysqld-max 
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-max

POSTUN

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

Triggers

MySQL-Max < 4.1.10

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