diff options
author | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2009-11-06 08:39:56 +0100 |
---|---|---|
committer | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2009-11-06 08:39:56 +0100 |
commit | 189a5b7f7665ce2c1d4d406ca7343ffeb3ea2afd (patch) | |
tree | 587cde15e3451ba5354d35ddb92e0a441d2514d1 | |
parent | c1ff4bb5b83ee24724041aa7babec986b6ad60ab (diff) |
mysql: moved pid dir from /var/run/mysql to /var/lib/mysql as /var/run is created upon boot
(and so var/run disappears)
added restart to init.d script
-rw-r--r-- | recipes/mysql/files/my.cnf | 2 | ||||
-rw-r--r-- | recipes/mysql/files/mysqld.sh | 10 | ||||
-rw-r--r-- | recipes/mysql/mysql_4.1.22.bb | 6 |
3 files changed, 11 insertions, 7 deletions
diff --git a/recipes/mysql/files/my.cnf b/recipes/mysql/files/my.cnf index 46f5316bc5..85560ebf5c 100644 --- a/recipes/mysql/files/my.cnf +++ b/recipes/mysql/files/my.cnf @@ -10,7 +10,7 @@ err-log = /var/log/mysql.err user = mysql port = 3306 socket = /tmp/mysql.sock -pid-file = /var/run/mysql/mysqld.pid +pid-file = /var/lib/mysql/mysqld.pid log-error = /var/log/mysqld.err basedir = /usr datadir = /var/mysql diff --git a/recipes/mysql/files/mysqld.sh b/recipes/mysql/files/mysqld.sh index c94772e202..479ebdb257 100644 --- a/recipes/mysql/files/mysqld.sh +++ b/recipes/mysql/files/mysqld.sh @@ -7,13 +7,17 @@ case "$1" in /usr/bin/mysqld_safe & ;; stop) - if test -f /var/run/mysqld.pid ; then - PID=`cat /var/run/mysqld.pid` + if test -f /var/lib/mysql/mysqld.pid ; then + PID=`cat /var/lib/mysql/mysqld.pid` kill $PID fi ;; + restart) + $0 stop + $0 start + ;; *) - echo "Usage: /etc/init.d/mysqld {start|stop}" + echo "Usage: /etc/init.d/mysqld {start|stop|restart}" ;; esac diff --git a/recipes/mysql/mysql_4.1.22.bb b/recipes/mysql/mysql_4.1.22.bb index dae1dd6701..9e5ff885f9 100644 --- a/recipes/mysql/mysql_4.1.22.bb +++ b/recipes/mysql/mysql_4.1.22.bb @@ -3,7 +3,7 @@ HOMEPAGE = "http://www.mysql.com/" SECTION = "libs" LICENSE = "GPL" DEPENDS = "ncurses" -PR = "r5" +PR = "r6" SRC_URI = "http://downloads.mysql.com/archives/mysql-4.1/mysql-${PV}.tar.gz \ file://autofoo.patch;patch=1 \ @@ -63,8 +63,8 @@ pkg_postinst_mysql-server () { #Install the database test -d /usr/bin || mkdir -p /usr/bin test -e /usr/bin/hostname || ln -s /bin/hostname /usr/bin/hostname - mkdir /var/run/mysql - chown mysql.nogroup /var/run/mysql + mkdir /var/lib/mysql + chown mysql.nogroup /var/lib/mysql mysql_install_db |