summaryrefslogtreecommitdiff
path: root/scripts/mysqlaccess.sh
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2017-07-25 00:41:54 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2017-07-25 00:41:54 +0300
commit786ad0a158f92eae0d65b02f34e864a7bbd8390e (patch)
tree8b796ce3ce81ab3c1f73e6eb5c594c74619810c0 /scripts/mysqlaccess.sh
parent2ce3f95151a424f950be40140c45b0ba583e07ab (diff)
parentc8a0244e957bc4beff453f09c881bb51752d682c (diff)
downloadmariadb-git-786ad0a158f92eae0d65b02f34e864a7bbd8390e.tar.gz
Merge remote-tracking branch 'origin/5.5' into 10.0
Diffstat (limited to 'scripts/mysqlaccess.sh')
-rw-r--r--scripts/mysqlaccess.sh19
1 files changed, 13 insertions, 6 deletions
diff --git a/scripts/mysqlaccess.sh b/scripts/mysqlaccess.sh
index 3626794d533..e1872bd0cf8 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,16 +477,23 @@ MySQLaccess::Report::Print_Header();
# *****************************
# Read configuration-file
MySQLaccess::Debug::Print(1, "Reading configuration file...");
- if (-f "./$script_conf") {
- require "./$script_conf";
+ if (-f "@sysconfdir@/$script_conf") {
+ print "Configuration file '$script_conf' is found in '@sysconfdir@/'\n";
+ require "@sysconfdir@/$script_conf";
}
elsif (-f "@prefix@/$script_conf") {
+ print "Configuration file '$script_conf' is found in '@prefix@/'\n";
require "@prefix@/$script_conf";
}
- elsif (-f "@sysconfdir@/$script_conf") {
- require "@sysconfdir@/$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 @prefix@/\n";
+ print "Please move it to one of these locations and retry.\n\n";
+ exit 0;
}
+
# ****************************
# Read in all parameters
if ($MySQLaccess::CMD) { #command-line version