Merge pull request #157 from 0xbsec/WindowsPorting

#87 small fixes for windows porting
This commit is contained in:
Jean-Marie Renouard 2016-02-21 17:45:29 +01:00
commit 1812a7a854

View file

@ -507,7 +507,7 @@ sub mysql_setup {
# Did we already get a username and password passed on the command line?
if ( $opt{user} ne 0 and $opt{pass} ne 0 ) {
$mysqllogin = "-u $opt{user} -p'$opt{pass}'" . $remotestring;
$mysqllogin = "-u $opt{user} -p\"$opt{pass}\"" . $remotestring;
my $loginstatus = `$mysqladmincmd ping $mysqllogin 2>&1`;
if ( $loginstatus =~ /mysqld is alive/ ) {
goodprint
@ -649,7 +649,7 @@ sub mysql_setup {
$mysqllogin = "-u $name";
if ( length($password) > 0 ) {
$mysqllogin .= " -p'$password'";
$mysqllogin .= " -p\"$password\"";
}
$mysqllogin .= $remotestring;
my $loginstatus = `$mysqladmincmd ping $mysqllogin 2>&1`;
@ -658,7 +658,7 @@ sub mysql_setup {
if ( !length($password) ) {
# Did this go well because of a .my.cnf file or is there no password set?
my $userpath = `ls -d ~`;
my $userpath = `printenv HOME`;
chomp($userpath);
unless ( -e "$userpath/.my.cnf" ) {
badprint
@ -2948,7 +2948,7 @@ sub dump_result {
# ---------------------------------------------------------------------------
# BEGIN 'MAIN'
# ---------------------------------------------------------------------------
headerprint # Header Print
headerprint; # Header Print
mysql_setup; # Gotta login first
validate_tuner_version; # Check last version
os_setup; # Set up some OS variables