Skip to content

Commit

Permalink
BUG#13788154 INIT.D MYSQL SCRIPT CREATED BY MYSQL SOLARIS PACKAGE FAI…
Browse files Browse the repository at this point in the history
…LS TO RUN DUE TO USE OF PIDOF

pidof is Linuxism, prefer pgrep on other UNIX systems.
  • Loading branch information
trosten committed Dec 6, 2016
1 parent dafbdc7 commit 9ccd554
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion support-files/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion support-files/mysql.server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 9ccd554

Please sign in to comment.