From 8f27e65bddd7d4b8515ce620fb485fdd78fcdf89 Mon Sep 17 00:00:00 2001 From: Constantin Jucovschi Date: Fri, 24 Apr 2009 07:20:22 -0400 Subject: Initial commit --- rasmgr/rasmgr_main.cc | 256 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 256 insertions(+) create mode 100644 rasmgr/rasmgr_main.cc (limited to 'rasmgr/rasmgr_main.cc') diff --git a/rasmgr/rasmgr_main.cc b/rasmgr/rasmgr_main.cc new file mode 100644 index 0000000..4399d13 --- /dev/null +++ b/rasmgr/rasmgr_main.cc @@ -0,0 +1,256 @@ +/* +* This file is part of rasdaman community. +* +* Rasdaman community is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Rasdaman community is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with rasdaman community. If not, see . +* +* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / +rasdaman GmbH. +* +* For more information please see +* or contact Peter Baumann via . +/ +/** + * SOURCE: rasmgr_main.cc + * + * MODULE: rasmgr + * CLASS: + * + * PURPOSE: + * management of rasserver executables + * + * COMMENTS: + * - FIXME: looks like a rasmgr slave still uses old comm scheme -- compatible? + * +*/ + +#include + +#include "rasmgr.hh" +#include "rasmgr_config.hh" +#include "rasmgr_host.hh" +#include "rasmgr_dbm.hh" +#include "rasmgr_srv.hh" +#include "rasmgr_master.hh" +#include "rasmgr_rascontrol.hh" +#include "rasmgr_users.hh" +#include "ras_crypto.hh" +#include "rasmgr_localsrv.hh" +#include "rasmgr_error.hh" + +#ifndef COMPDATE +#error "Please specify the COMPDATE variable!" +/* +COMPDATE=`date +"%d.%m.%Y %H:%M:%S"` + +and -DCOMPDATE="\"$(COMPDATE)\"" when compiling +*/ +#endif + +#define DEBUG_MAIN +#undef DEBUG_HH +#include "debug.hh" + + +Configuration config; + +HostManager hostmanager; +DatabaseHostManager dbHostManager; +DatabaseManager dbManager; +RasServerManager rasManager; +MasterComm masterCommunicator; +RasControl rascontrol; +UserManager userManager; +Authorization authorization; +LocalServerManager localServerManager; +RandomGenerator randomGenerator; + +void installSignalHandlers(); + +int main(int argc, char** argv, char** envp) +{ + SET_OUTPUT( true ); // enable debugging trace, if compiled so + + ENTER( "main." ); + + std::cout<< "rasmgr: rasdaman server manager tool. rasdaman v" << RMANVERSION / 1000. << " -- generated on " << COMPDATE << "." << std::endl; + +// just to see the difference between an official release and the inside development version +#ifdef NO_OFFICIAL_RELEASE + std::cout<<"This is not the official release version, it supports test modus and rasserver in debugger"<result(); // print total time elapsed + } + catch(RCError& e) + { + char *errorMsg; + e.getString(errorMsg); + std::cout<<"Error: "<='A' && *t<='Z') *t|='a'-'A'; + } + return string; +} + -- cgit