MDEV-7368 : SLES: Failed to start mysql.service: Unit
mysql.service failed to load Added 'systemctl daemon-reload' command in postin and postun rpm scripts.
This commit is contained in:
parent
5900333aa5
commit
d9d994089f
@ -1,6 +1,10 @@
|
|||||||
|
|
||||||
# Make MySQL start/shutdown automatically when the machine does it.
|
# Make MySQL start/shutdown automatically when the machine does it.
|
||||||
if [ $1 = 1 ] ; then
|
if [ $1 = 1 ] ; then
|
||||||
|
if [ -x /usr/bin/systemctl ] ; then
|
||||||
|
/usr/bin/systemctl daemon-reload >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -x /sbin/chkconfig ] ; then
|
if [ -x /sbin/chkconfig ] ; then
|
||||||
/sbin/chkconfig --add mysql
|
/sbin/chkconfig --add mysql
|
||||||
fi
|
fi
|
||||||
@ -51,9 +55,9 @@ fi
|
|||||||
SETARGETDIR=/etc/selinux/targeted/src/policy
|
SETARGETDIR=/etc/selinux/targeted/src/policy
|
||||||
SEDOMPROG=$SETARGETDIR/domains/program
|
SEDOMPROG=$SETARGETDIR/domains/program
|
||||||
SECONPROG=$SETARGETDIR/file_contexts/program
|
SECONPROG=$SETARGETDIR/file_contexts/program
|
||||||
if [ -f /etc/redhat-release ] \
|
if [ -f /etc/redhat-release ] ; then
|
||||||
&& grep -q "Red Hat Enterprise Linux .. release 4" /etc/redhat-release \
|
if grep '\(Red Hat Enterprise Linux ..\|CentOS\) release 4' \
|
||||||
|| grep -q "CentOS release 4" /etc/redhat-release ; then
|
/etc/redhat-release >/dev/null 2>&1; then
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo 'Notes regarding SELinux on this platform:'
|
echo 'Notes regarding SELinux on this platform:'
|
||||||
@ -76,6 +80,7 @@ if [ -f /etc/redhat-release ] \
|
|||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -x sbin/restorecon ] ; then
|
if [ -x sbin/restorecon ] ; then
|
||||||
sbin/restorecon -R var/lib/mysql
|
sbin/restorecon -R var/lib/mysql
|
||||||
|
@ -6,3 +6,10 @@ if [ $1 -ge 1 ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $1 = 0 ] ; then
|
||||||
|
if [ -x /usr/bin/systemctl ] ; then
|
||||||
|
/usr/bin/systemctl daemon-reload > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user