diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-07-18 14:59:10 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-07-18 14:59:10 +0200 |
commit | 9a5fe1f4ea53f26690bfe2cd4f42050bfccaf4af (patch) | |
tree | 5456add57977533b445a03d2e03e87ffa7f483d8 /scripts/mysqlaccess.sh | |
parent | e7fd6ed3875bd91dbd30a62291ae471c35da8fdf (diff) | |
parent | 34cd74e52185de2ea3156e8295de3c638cde8c88 (diff) | |
download | mariadb-git-9a5fe1f4ea53f26690bfe2cd4f42050bfccaf4af.tar.gz |
Merge remote-tracking branch 'mysql/5.5' into 5.5
Diffstat (limited to 'scripts/mysqlaccess.sh')
-rw-r--r-- | scripts/mysqlaccess.sh | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/scripts/mysqlaccess.sh b/scripts/mysqlaccess.sh index 1d01c84735a..431c70812cb 100644 --- a/scripts/mysqlaccess.sh +++ b/scripts/mysqlaccess.sh @@ -1,6 +1,6 @@ -#!/usr/bin/perl +#!@PERL_PATH@ -# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public @@ -477,15 +477,22 @@ MySQLaccess::Report::Print_Header(); # ***************************** # Read configuration-file MySQLaccess::Debug::Print(1, "Reading configuration file..."); - if (-f "./$script_conf") { - require "./$script_conf"; - } - elsif (-f "@sysconfdir@/$script_conf") { + if (-f "@sysconfdir@/$script_conf") { + print "Configuration file '$script_conf' is found in '@sysconfdir@/'\n"; require "@sysconfdir@/$script_conf"; } elsif (-f "/etc/$script_conf") { + print "Configuration file '$script_conf' is found in '/etc/'\n"; require "/etc/$script_conf"; } + elsif (-f "./$script_conf") { + print "\nERROR! Configuration file '$script_conf' is found in the current "; + print "directory.\nThe permissible locations for this file are either "; + print "@sysconfdir@/ or /etc/\n"; + print "Please move it to one of these locations and retry.\n\n"; + exit 0; + } + # **************************** # Read in all parameters |