maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #08076
Re: [Commits] Rev 4398: MDEV-7368 : SLES: Failed to start mysql.service: Unit
Hi, Nirbhay!
On Dec 23, Nirbhay Choubey wrote:
> At lp:~maria-captains/maria/5.5
>
> ------------------------------------------------------------
> revno: 4398
> revision-id: nirbhay@xxxxxxxxxxx-20141224033207-8lh5i8d84qsjey79
> parent: elenst@xxxxxxxxxxxxxxxx-20141223172123-pkfhjnv7oy1suxpa
> committer: Nirbhay Choubey <nirbhay@xxxxxxxxxxx>
> branch nick: b7368-5.5
> timestamp: Tue 2014-12-23 22:32:07 -0500
> message:
> 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.
> === modified file 'support-files/rpm/server-postin.sh'
> --- a/support-files/rpm/server-postin.sh 2013-11-20 11:18:46 +0000
> +++ b/support-files/rpm/server-postin.sh 2014-12-24 03:32:07 +0000
> @@ -1,6 +1,10 @@
>
> # Make MySQL start/shutdown automatically when the machine does it.
> if [ $1 = 1 ] ; then
> + if [ -x /usr/bin/systemctl ] ; then
> + /usr/bin/systemctl daemon-reload >/dev/null 2>&1
> + fi
> +
looks ok
> if [ -x /sbin/chkconfig ] ; then
> /sbin/chkconfig --add mysql
> fi
> @@ -51,30 +55,31 @@
> SETARGETDIR=/etc/selinux/targeted/src/policy
> SEDOMPROG=$SETARGETDIR/domains/program
> SECONPROG=$SETARGETDIR/file_contexts/program
> +if [ -f /etc/redhat-release ] ; then
> + if grep -q "Red Hat Enterprise Linux .. release 4" /etc/redhat-release \
> + || grep -q "CentOS release 4" /etc/redhat-release ; then
I'd rather written
if grep -Eqs '(Red Hat Enterprise Linux ..|CentOS) release 4' /etc/redhat-release; then
or (which is more portable, but perhaps unnecessary so for an rpm postin script)
if grep '\(Red Hat Enterprise Linux ..\|CentOS\) release 4' /etc/redhat-release >/dev/null 2>&1; then
but if you'd like you can push your variant.
Regards,
Sergei
Follow ups