pt-stalk.conf is not searched for in cwd
Bug #871621 reported by
Guillaume Lefranc
This bug report is a duplicate of:
Bug #880341: pt-stalk documentation for .conf file is wrong.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
New
|
Undecided
|
Unassigned |
Bug Description
The directory path which is parsed is the one where pt-stalk resides, not the current working directory (as it is reported in the doc).
Example :
[tanj@a ~]$ pwd
/home/tanj
[tanj@a ~]$ sh -x /usr/bin/pt-stalk
+ '[' -f /usr/bin/
Thanks
tags: | added: pt-stalk |
To post a comment you must log in.
Patch following
--- pt-stalk 2011-09-01 11:01:03.000000000 -0500 ####### ####### ####### ####### ####### ####### ####### ####### ####### ## ####### ####### ####### ####### ####### ####### ####### ####### ####### ##
+++ /usr/bin/pt-stalk 2011-10-10 02:57:18.000000000 -0500
@@ -7,8 +7,8 @@
# #######
# Check for the existence of a config file and source it if it exists
# #######
-if [ -f "${0}.conf" ]; then
- . "${0}.conf"
+if [ -f "${0##*/}.conf" ]; then
+ . "${0##*/}.conf"
fi
# ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ##