diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysqlaccess.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/mysqlaccess.sh b/scripts/mysqlaccess.sh index 03810e95b72..85112a59ee4 100644 --- a/scripts/mysqlaccess.sh +++ b/scripts/mysqlaccess.sh @@ -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 |