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.
This commit is contained in:
parent
dafbdc788a
commit
9ccd55466d
@ -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
|
# 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
|
# 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()
|
ENDFOREACH()
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
|
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
|
SET (PIDOF "pidof")
|
||||||
|
ELSE()
|
||||||
|
SET (PIDOF "pgrep -d' ' -f")
|
||||||
|
ENDIF()
|
||||||
SET(prefix ${CMAKE_INSTALL_PREFIX})
|
SET(prefix ${CMAKE_INSTALL_PREFIX})
|
||||||
FOREACH(script mysqld_multi.server mysql-log-rotate binary-configure
|
FOREACH(script mysqld_multi.server mysql-log-rotate binary-configure
|
||||||
config.medium.ini config.small.ini config.huge.ini ndb-config-2-node.ini)
|
config.medium.ini config.small.ini config.huge.ini ndb-config-2-node.ini)
|
||||||
|
@ -359,7 +359,7 @@ case "$mode" in
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Try to find appropriate mysqld process
|
# Try to find appropriate mysqld process
|
||||||
mysqld_pid=`pidof $libexecdir/mysqld`
|
mysqld_pid=`@PIDOF@ $libexecdir/mysqld`
|
||||||
|
|
||||||
# test if multiple pids exist
|
# test if multiple pids exist
|
||||||
pid_count=`echo $mysqld_pid | wc -w`
|
pid_count=`echo $mysqld_pid | wc -w`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user