From 01c20a7d13169e2d77e63296de33000a7afc190d Mon Sep 17 00:00:00 2001 From: Michael Hanson Date: Tue, 2 Aug 2011 20:12:48 +0000 Subject: runit-scripts: Ensure /var/run/mysqld exists --- abs/core/runit-scripts/PKGBUILD | 2 +- abs/core/runit-scripts/runit-scripts-2.1.1-22.src.tar.gz | 1 + abs/core/runit-scripts/runitscripts/services/mysql/run | 11 ++++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 120000 abs/core/runit-scripts/runit-scripts-2.1.1-22.src.tar.gz diff --git a/abs/core/runit-scripts/PKGBUILD b/abs/core/runit-scripts/PKGBUILD index 6c8a5ed..f6cace4 100755 --- a/abs/core/runit-scripts/PKGBUILD +++ b/abs/core/runit-scripts/PKGBUILD @@ -1,6 +1,6 @@ pkgname=runit-scripts pkgver=2.1.1 -pkgrel=21 +pkgrel=22 pkgdesc="collection of startup scripts for runit" url="http://smarden.org/runit/" license="BSD" diff --git a/abs/core/runit-scripts/runit-scripts-2.1.1-22.src.tar.gz b/abs/core/runit-scripts/runit-scripts-2.1.1-22.src.tar.gz new file mode 120000 index 0000000..9fba9d2 --- /dev/null +++ b/abs/core/runit-scripts/runit-scripts-2.1.1-22.src.tar.gz @@ -0,0 +1 @@ +/data/pkg_repo/packages/runit-scripts-2.1.1-22.src.tar.gz \ No newline at end of file diff --git a/abs/core/runit-scripts/runitscripts/services/mysql/run b/abs/core/runit-scripts/runitscripts/services/mysql/run index 4b1a604..9589e6d 100755 --- a/abs/core/runit-scripts/runitscripts/services/mysql/run +++ b/abs/core/runit-scripts/runitscripts/services/mysql/run @@ -11,13 +11,13 @@ MYSQLD_ROOT="/data/srv/mysql" if [ ! `egrep '^mysql:' /etc/group` ]; then stat_runit "Adding mysql group" groupadd -g 89 mysql - + fi if [ ! `egrep '^mysql:' /etc/passwd` ]; then stat_runit "Adding mysql user" useradd -u 89 -g mysql -d $MYSQLD_ROOT -s /bin/false mysql [ -d $MYSQLD_ROOT ] && chown -R mysql.mysql $MYSQLD_ROOT - + fi if [ ! -d $MYSQLD_ROOT ]; then @@ -30,5 +30,10 @@ if [ ! -e /var/log/mysqld.log ]; then touch /var/log/mysqld.log chown mysql /var/log/mysqld.log fi -#exec /usr/sbin/mysqld --skip-name-resolve -u mysql 2>/dev/null >/dev/null + +if [ ! -d /var/run/mysqld ]; then + mkdir -p /var/run/mysqld + chown mysql /var/run/mysqld +fi + exec /usr/sbin/mysqld -u mysql 2>/dev/null >/dev/null -- cgit v0.12