Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 6fba7f6e8a20b1ecf0a307835eb8fbb7 > scriptlet

mysql-5.0.89-0.1mdv2009.0.i586.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