mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-06 20:38:22 +00:00
PT-2275 - "System Summary" graph breaks when perl is not available (OS summary dashboard)
- Added check for Perl binary in lib/bash/parse_options.sh - Updated tools - Updated t/lib/bash/parse_options.sh, so it includes required package alt_cmds.sh
This commit is contained in:
@@ -65,6 +65,7 @@ _d () {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
ARGV="" # Non-option args (probably input files)
|
ARGV="" # Non-option args (probably input files)
|
||||||
@@ -96,6 +97,11 @@ usage_or_errors() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z $(_which perl) ]; then
|
||||||
|
echo "Perl binary required to run this tool"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$OPT_HELP" ]; then
|
if [ "$OPT_HELP" ]; then
|
||||||
usage "$file"
|
usage "$file"
|
||||||
echo
|
echo
|
||||||
|
@@ -106,6 +106,7 @@ rm_tmpdir() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
ARGV="" # Non-option args (probably input files)
|
ARGV="" # Non-option args (probably input files)
|
||||||
@@ -137,6 +138,11 @@ usage_or_errors() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z $(_which perl) ]; then
|
||||||
|
echo "Perl binary required to run this tool"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$OPT_HELP" ]; then
|
if [ "$OPT_HELP" ]; then
|
||||||
usage "$file"
|
usage "$file"
|
||||||
echo
|
echo
|
||||||
|
@@ -67,6 +67,7 @@ _d () {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
ARGV="" # Non-option args (probably input files)
|
ARGV="" # Non-option args (probably input files)
|
||||||
@@ -98,6 +99,11 @@ usage_or_errors() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z $(_which perl) ]; then
|
||||||
|
echo "Perl binary required to run this tool"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$OPT_HELP" ]; then
|
if [ "$OPT_HELP" ]; then
|
||||||
usage "$file"
|
usage "$file"
|
||||||
echo
|
echo
|
||||||
|
@@ -108,6 +108,7 @@ rm_tmpdir() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
ARGV="" # Non-option args (probably input files)
|
ARGV="" # Non-option args (probably input files)
|
||||||
@@ -139,6 +140,11 @@ usage_or_errors() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z $(_which perl) ]; then
|
||||||
|
echo "Perl binary required to run this tool"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$OPT_HELP" ]; then
|
if [ "$OPT_HELP" ]; then
|
||||||
usage "$file"
|
usage "$file"
|
||||||
echo
|
echo
|
||||||
|
@@ -106,6 +106,7 @@ rm_tmpdir() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
ARGV="" # Non-option args (probably input files)
|
ARGV="" # Non-option args (probably input files)
|
||||||
@@ -137,6 +138,11 @@ usage_or_errors() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z $(_which perl) ]; then
|
||||||
|
echo "Perl binary required to run this tool"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$OPT_HELP" ]; then
|
if [ "$OPT_HELP" ]; then
|
||||||
usage "$file"
|
usage "$file"
|
||||||
echo
|
echo
|
||||||
|
@@ -119,6 +119,7 @@ kill_all_subshells() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
ARGV="" # Non-option args (probably input files)
|
ARGV="" # Non-option args (probably input files)
|
||||||
@@ -150,6 +151,11 @@ usage_or_errors() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z $(_which perl) ]; then
|
||||||
|
echo "Perl binary required to run this tool"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$OPT_HELP" ]; then
|
if [ "$OPT_HELP" ]; then
|
||||||
usage "$file"
|
usage "$file"
|
||||||
echo
|
echo
|
||||||
|
@@ -74,6 +74,7 @@ _d () {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
ARGV="" # Non-option args (probably input files)
|
ARGV="" # Non-option args (probably input files)
|
||||||
@@ -105,6 +106,11 @@ usage_or_errors() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z $(_which perl) ]; then
|
||||||
|
echo "Perl binary required to run this tool"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$OPT_HELP" ]; then
|
if [ "$OPT_HELP" ]; then
|
||||||
usage "$file"
|
usage "$file"
|
||||||
echo
|
echo
|
||||||
|
@@ -26,6 +26,10 @@
|
|||||||
# GLOBAL $PT_TMPDIR AND $TOOL MUST BE SET BEFORE USING THIS LIB!
|
# GLOBAL $PT_TMPDIR AND $TOOL MUST BE SET BEFORE USING THIS LIB!
|
||||||
# XXX
|
# XXX
|
||||||
|
|
||||||
|
# XXX
|
||||||
|
# THIS LIB REQUIRES alt_cmds!
|
||||||
|
# XXX
|
||||||
|
|
||||||
# Parsing command line options with Bash is easy until we have to dealt
|
# Parsing command line options with Bash is easy until we have to dealt
|
||||||
# with values that have spaces, e.g. --option="hello world". This is
|
# with values that have spaces, e.g. --option="hello world". This is
|
||||||
# further complicated by command line vs. config file. From the command
|
# further complicated by command line vs. config file. From the command
|
||||||
@@ -87,6 +91,11 @@ usage_or_errors() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z $(_which perl) ]; then
|
||||||
|
echo "Perl binary required to run this tool"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$OPT_HELP" ]; then
|
if [ "$OPT_HELP" ]; then
|
||||||
usage "$file"
|
usage "$file"
|
||||||
echo
|
echo
|
||||||
|
@@ -7,6 +7,7 @@ TOOL="pt-stalk"
|
|||||||
PT_TMPDIR="$TEST_PT_TMPDIR"
|
PT_TMPDIR="$TEST_PT_TMPDIR"
|
||||||
|
|
||||||
source "$LIB_DIR/log_warn_die.sh"
|
source "$LIB_DIR/log_warn_die.sh"
|
||||||
|
source "$LIB_DIR/alt_cmds.sh"
|
||||||
source "$LIB_DIR/parse_options.sh"
|
source "$LIB_DIR/parse_options.sh"
|
||||||
|
|
||||||
# ############################################################################
|
# ############################################################################
|
||||||
|
Reference in New Issue
Block a user