37 #include "TheBESKeys.h" 38 #include "BESInternalFatalError.h" 40 BESKeys *TheBESKeys::_instance = 0;
57 string try_ini =
"/usr/local/etc/bes/bes.conf";
58 if (access(try_ini.c_str(), R_OK) == 0) {
64 try_ini =
"/etc/bes/bes.conf";
65 if (access(try_ini.c_str(), R_OK) == 0) {
71 try_ini =
"/usr/etc/bes/bes.conf";
72 if (access(try_ini.c_str(), R_OK) == 0) {
78 throw BESInternalFatalError(
"Unable to find a conf file or module version mismatch.", __FILE__, __LINE__);
85 string try_ini =
"/usr/local/etc/bes/bes.conf";
87 int statret = stat(try_ini.c_str(), &buf);
88 if (statret == -1 || !S_ISREG(buf.st_mode)) {
89 try_ini =
"/etc/bes/bes.conf";
90 int statret = stat(try_ini.c_str(), &buf);
91 if (statret == -1 || !S_ISREG(buf.st_mode)) {
92 try_ini =
"/usr/etc/bes/bes.conf";
93 int statret = stat(try_ini.c_str(), &buf);
94 if (statret == -1 || !S_ISREG(buf.st_mode)) {
exception thrown if an internal error is found and is fatal to the BES
mapping of key/value pairs defining different behaviors of an application.
static BESKeys * TheKeys()