Some shell tools still use basename
Bug #912902 reported by
Baron Schwartz
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Low
|
Brian Fraser |
Bug Description
All of the shell tools do something like this:
if [ "$(basename "$0")" = "..." ]
It turns out that sometimes basename can be "-bash", so that looks like
$ basename -bash
And "basename" doesn't take a -bash option.
The fix is to do this:
if [ "$(basename -- "$0")" = "..." ]
Related branches
lp://staging/~percona-toolkit-dev/percona-toolkit/fix-912902
- Daniel Nichter: Approve
- Brian Fraser (community): Approve
-
Diff: 43 lines (+8/-2)2 files modifiedbin/pt-pmp (+4/-1)
bin/pt-sift (+4/-1)
Changed in percona-toolkit: | |
status: | New → Confirmed |
tags: | added: shell-tools |
Changed in percona-toolkit: | |
status: | Confirmed → In Progress |
summary: |
- basename not guaranteed to work for Shell tools + Some shell tools still use basename |
Changed in percona-toolkit: | |
importance: | Undecided → Low |
status: | In Progress → Fix Committed |
assignee: | nobody → Brian Fraser (fraserbn) |
milestone: | none → 2.1.2 |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PT-765