From 46165ca650578db1555ac63fbea43f9efd80b944 Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Tue, 3 Mar 2015 22:59:12 +0100 Subject: [PATCH] Check permissions when starting service on RHEL-6 Resolves: #1194699 Conflicts: mariadb.spec --- mariadb.spec | 4 ++++ mysql.init.in | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/mariadb.spec b/mariadb.spec index ed867cc..3b91308 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -1127,6 +1127,10 @@ fi %endif %changelog +* Tue Mar 03 2015 Honza Horak - 1:10.0.16-6 +- Check permissions when starting service on RHEL-6 + Resolves: #1194699 + * Fri Feb 13 2015 Matej Muzila - 1:10.0.16-4 - Enable tokudb diff --git a/mysql.init.in b/mysql.init.in index be34fbf..e5a1659 100644 --- a/mysql.init.in +++ b/mysql.init.in @@ -45,6 +45,13 @@ source "@libexecdir@/mysql-scripts-common" start(){ [ -x $exec ] || exit 5 + + # check permissions + if ! touch $(dirname $socketfile) &>/dev/null ; then + action $"Starting $prog: " /bin/false + return 4 + fi + # check to see if it's already running MYSQLDRUNNING=0 if [ -f "$pidfile" ]; then