[community-mysql] Check permissions when starting service on RHEL-6 Resolves: #1194699
Honza Horak
hhorak at fedoraproject.org
Fri Mar 6 19:50:56 UTC 2015
commit 42a566e9d735656d4a0c0cc498ee0aa8c0513266
Author: Honza Horak <hhorak at redhat.com>
Date: Fri Mar 6 16:02:11 2015 +0100
Check permissions when starting service on RHEL-6
Resolves: #1194699
community-mysql.spec | 2 ++
mysql.init.in | 7 +++++++
2 files changed, 9 insertions(+)
---
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
More information about the scm-commits
mailing list