diff options
author | Sergei Golubchik <serg@mariadb.org> | 2014-10-15 12:59:13 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2014-10-15 12:59:13 +0200 |
commit | f62c12b405ba7ec80b8e2490856b83c6f5899211 (patch) | |
tree | 010605c7f145da6ea6ac14b39abc4cf700d619b1 /scripts/mytop.sh | |
parent | f947f73b2b6d2bd246b81a9038224d2a85777520 (diff) | |
parent | f1afc003eefe0aafd3e070c7453d9e029d8445a8 (diff) | |
download | mariadb-git-f62c12b405ba7ec80b8e2490856b83c6f5899211.tar.gz |
Merge 10.0.14 into 10.1
Diffstat (limited to 'scripts/mytop.sh')
-rw-r--r-- | scripts/mytop.sh | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/scripts/mytop.sh b/scripts/mytop.sh index fe7765988fb..17a87e9efd2 100644 --- a/scripts/mytop.sh +++ b/scripts/mytop.sh @@ -70,7 +70,6 @@ sub GetShowStatus(); sub cmd_s; sub cmd_S; sub cmd_q; -sub FindProg($); ## Default Config Values @@ -1366,9 +1365,9 @@ sub GetInnoDBStatus() { if (not $config{pager}) { - if (not $config{pager} = FindProg('less')) + if (not $config{pager} = my_which('less')) { - $config{pager} = FindProg('more'); + $config{pager} = my_which('more'); } } @@ -1467,9 +1466,9 @@ sub GetShowVariables() { if (not $config{pager}) { - if (not $config{pager} = FindProg('less')) + if (not $config{pager} = my_which('less')) { - $config{pager} = FindProg('more'); + $config{pager} = my_which('more'); } } @@ -1825,25 +1824,6 @@ sub Execute($) return $sth; } -sub FindProg($) -{ - my $prog = shift; - my $found = undef; - my @search_dirs = ("/bin", "/usr/bin", "/usr/sbin", - "/usr/local/bin", "/usr/local/sbin"); - - for (@search_dirs) - { - my $loc = "$_/$prog"; - if (-e $loc) - { - $found = $loc; - last; - } - } - return $found; -} - #### #### my_which is used, because we can't assume that every system has the #### which -command. my_which can take only one argument at a time. |