diff options
author | Terje Rosten <terje.rosten@oracle.com> | 2016-12-06 08:35:26 +0100 |
---|---|---|
committer | Terje Rosten <terje.rosten@oracle.com> | 2016-12-06 08:54:22 +0100 |
commit | 9ccd55466d1384865768663dd6bf2b04e11ba774 (patch) | |
tree | 2922c1481f9128b7be1f3236371368b8749055c9 /support-files | |
parent | dafbdc788a1fe551990c736daaf2a39998f4cbc0 (diff) | |
download | mariadb-git-9ccd55466d1384865768663dd6bf2b04e11ba774.tar.gz |
BUG#13788154 INIT.D MYSQL SCRIPT CREATED BY MYSQL SOLARIS PACKAGE FAILS TO RUN DUE TO USE OF PIDOF
pidof is Linuxism, prefer pgrep on other UNIX systems.
Diffstat (limited to 'support-files')
-rw-r--r-- | support-files/CMakeLists.txt | 7 | ||||
-rw-r--r-- | support-files/mysql.server.sh | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index 6aef51a5c16..924f08dfc83 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -48,6 +48,11 @@ FOREACH(inifile my-huge my-innodb-heavy-4G my-large my-medium my-small) ENDFOREACH() IF(UNIX) + IF(CMAKE_SYSTEM_NAME MATCHES "Linux") + SET (PIDOF "pidof") + ELSE() + SET (PIDOF "pgrep -d' ' -f") + ENDIF() SET(prefix ${CMAKE_INSTALL_PREFIX}) FOREACH(script mysqld_multi.server mysql-log-rotate binary-configure config.medium.ini config.small.ini config.huge.ini ndb-config-2-node.ini) diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index 909d33f8770..cb13d2f10ba 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -359,7 +359,7 @@ case "$mode" in fi else # Try to find appropriate mysqld process - mysqld_pid=`pidof $libexecdir/mysqld` + mysqld_pid=`@PIDOF@ $libexecdir/mysqld` # test if multiple pids exist pid_count=`echo $mysqld_pid | wc -w` |