From fda5bad78d211c7ef039abbd8dfd072528a91f70 Mon Sep 17 00:00:00 2001 From: Krzysztof Gibas Date: Fri, 24 May 2013 19:43:26 +0200 Subject: [PATCH] fixed uname execution syntax --- mysqltuner.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mysqltuner.pl b/mysqltuner.pl index 4b06322..3e50639 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -100,6 +100,9 @@ sub usage { " --port Port to use for connection (default: 3306)\n". " --user Username to use for authentication\n". " --pass Password to use for authentication\n". + " Database type\n". + " --mysql Run with mysql database (default)\n". + " --maria Run with mariadb database\n". "\n". " Performance and Reporting Options\n". " --skipsize Don't enumerate tables and their types/sizes (default: on)\n". @@ -479,14 +482,14 @@ sub check_architecture { } elsif (`uname` =~ /FreeBSD/ && `sysctl -b hw.machine_arch` =~ /64/) { $arch = 64; goodprint "Operating on 64-bit architecture\n"; - } elsif (uname =~ /Darwin/ && uname -m =~ /Power Macintosh/) { + } elsif (`uname` =~ /Darwin/ && `uname -m` =~ /Power Macintosh/) { # Darwin box.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:57:01 PDT 2009; root:xnu1228.15.4~1/RELEASE_PPC Power Macintosh $arch = 64; goodprint "Operating on 64-bit architecture\n"; - } elsif (uname =~ /Darwin/ && uname -m =~ /x86_64/) { + } elsif (`uname` =~ /Darwin/ && `uname -m` =~ /x86_64/) { # Darwin gibas.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64 $arch = 64; - goodprint "Operating on 64-bit architecture\n"; + goodprint "Operating on 64-bit architecture\n"; } else { $arch = 32; if ($physical_memory > 2147483648) {