hhorak pushed to community-mysql (f22). "Check permissions when starting service on RHEL-6 (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Apr 9 05:11:24 UTC 2015


>From 42a566e9d735656d4a0c0cc498ee0aa8c0513266 Mon Sep 17 00:00:00 2001
From: Honza Horak <hhorak at redhat.com>
Date: Fri, 6 Mar 2015 16:02:11 +0100
Subject: Check permissions when starting service on RHEL-6 Resolves: #1194699


diff --git a/community-mysql.spec b/community-mysql.spec
index f83186e..d5cc07a 100644
--- a/community-mysql.spec
+++ b/community-mysql.spec
@@ -945,6 +945,8 @@ fi
 * Tue Mar 03 2015 Honza Horak <hhorak at redhat.com> - 5.6.23-4
 - Do not use scl prefix more than once in paths
   Based on https://www.redhat.com/archives/sclorg/2015-February/msg00038.html
+- Check permissions when starting service on RHEL-6
+  Resolves: #1194699
 
 * Mon Feb 23 2015 Honza Horak <hhorak at redhat.com> - 5.6.23-3
 - Expand paths in perl scripts in mysql-test
diff --git a/mysql.init.in b/mysql.init.in
index 3dfa55a..e9a34c2 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
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/community-mysql.git/commit/?h=f22&id=42a566e9d735656d4a0c0cc498ee0aa8c0513266


More information about the scm-commits mailing list