From 5b55c92ac53f1ddf2cd1bb2d6c3c028c3e2207d3 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Apr 2016 16:11:35 +0200 Subject: [PATCH] #184: Additional information for galera Removing dependency to Env module #192 --- mysqltuner.pl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mysqltuner.pl b/mysqltuner.pl index fc873b1..3eacdb1 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -51,7 +51,7 @@ use Data::Dumper; $Data::Dumper::Pair = " : "; # for which() -use Env; +#use Env; # Set up a few variables for use in the script my $tunerversion = "1.6.10"; @@ -445,13 +445,13 @@ sub os_setup { } sub get_http_cli { - my $httpcli = which("curl", $PATH); + my $httpcli = which("curl", $ENV{'PATH'}); chomp($httpcli); if ($httpcli) { return $httpcli; } - $httpcli = which("wget", $PATH); + $httpcli = which("wget", $ENV{'PATH'}); chomp($httpcli); if ($httpcli) { return $httpcli; @@ -608,7 +608,7 @@ sub mysql_setup { $mysqladmincmd = $opt{mysqladmin}; } else { - $mysqladmincmd = which("mysqladmin", $PATH); + $mysqladmincmd = which("mysqladmin", $ENV{'PATH'}); } chomp($mysqladmincmd); if ( !-e $mysqladmincmd && $opt{mysqladmin} ) { @@ -624,7 +624,7 @@ sub mysql_setup { $mysqlcmd = $opt{mysqlcmd}; } else { - $mysqlcmd = which("mysql", $PATH); + $mysqlcmd = which("mysql", $ENV{'PATH'}); } chomp($mysqlcmd); if ( !-e $mysqlcmd && $opt{mysqlcmd} ) { @@ -701,7 +701,7 @@ sub mysql_setup { exit 1; } } - my $svcprop = which("svcprop", $PATH); + my $svcprop = which("svcprop", $ENV{'PATH'}); if ( substr( $svcprop, 0, 1 ) =~ "/" ) { # We are on solaris @@ -3908,7 +3908,7 @@ sub dump_result { sub which { my $prog_name = shift; my $path_string = shift; - my @path_array = split /:/, $PATH; + my @path_array = split /:/, $ENV{'PATH'}; for my $path ( @path_array) { if ( -x "$path/$prog_name" ) {