mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 21:51:21 +00:00
Only cat cnf file > mysql-config-file if it exists.
This commit is contained in:
@@ -234,7 +234,7 @@ collect_mysql_info () {
|
||||
local port="$(get_var port "$dir/mysql-variables")"
|
||||
local cnf_file="$(find_my_cnf_file "$dir/mysqld-instances" ${port})"
|
||||
|
||||
cat "$cnf_file" > "$dir/mysql-config-file"
|
||||
[ -e "$cnf_file" ] && cat "$cnf_file" > "$dir/mysql-config-file"
|
||||
|
||||
local pid_file="$(get_var "pid_file" "$dir/mysql-variables")"
|
||||
local pid_file_exists=""
|
||||
|
@@ -28,7 +28,7 @@ wait
|
||||
|
||||
file_count=$(ls "$p" | wc -l)
|
||||
|
||||
is $file_count 14 "Creates the correct number of files (without --databases)"
|
||||
is $file_count 13 "Creates the correct number of files (without --databases)"
|
||||
|
||||
awk '{print $1}' "$p/mysqld-instances" > "$PT_TMPDIR/collect_mysqld_instances1.test"
|
||||
pids="$(_pidof mysqld)"
|
||||
|
Reference in New Issue
Block a user