Commiting files left from previous two commits.

parent b8955910
......@@ -61,6 +61,7 @@ set(CMAKE_INSTALL_PREFIX /usr/)
if (CLIENT)
add_subdirectory (fuse)
add_subdirectory (console)
add_subdirectory (man)
else (CLIENT)
add_subdirectory (mq)
add_subdirectory (common)
......@@ -74,13 +75,14 @@ add_subdirectory (sync)
add_subdirectory (fuse)
add_subdirectory (srm)
add_subdirectory (var)
add_subdirectory (man)
endif (CLIENT)
include_directories( ../ /usr/include/xrootd/ /usr/include/ )
link_directories( /usr/${LIB_INSTALL_DIR}/)
set(SYSCONFDIR "/etc" CACHE PATH "Directory for system configuration files" )
set(MANDIR "/usr/share/man/man1" CACHE PATH "Directory where man pages get installed" )
######################################################################################################################
# uninstall target
......
// ---------------------------------------------------------------------------------------------------------------------------------------------
// (C) 2011 CERN, Switzerland
// Copyright (C) 2011 CERN, Switzerland
// --------------------
// Except as expressly stated otherwise, the copyright and all other rights related to the EOS Software are held by CERN.
// The rights granted herein are limited to CERN's property rights in the EOS Software and do not include any other patents or intellectual property rights.
......@@ -11,5 +11,5 @@
// or severe physical or environmental damage.
// ---------------------------------------------------------------------------------------------------------------------------------------------
const char* license="\nCopyright Statement:\n--------------------\n\nExcept as expressly stated otherwise, the copyright and all other rights related to the EOS Software are held by CERN.\n\nThe rights granted herein are limited to CERN's property rights in the EOS Software and do not include any other patents or intellectual property rights.\nRedistribution and use in source and binary forms are not permitted unless explicitly granted.\nCERN provides no express or implied warranties of any kind for the EOS sofware, including but not limited to those of merchantability, fitness for a particular purpose and non-infringement of the proprietary rights, such as copyrights, patents and trade secrets, of third parties. CERN accepts no liability for the EOS software including any third party material.\nThe software is not intended for use in which the failure of the software could lead to death, personal injury, or severe physical or environmental damage.\n\n(C) 2011 CERN, Switzerland\n\n";
const char* license="Copyright (C) 2011 CERN, Switzerland\n\nExcept as expressly stated otherwise, the copyright and all other rights related to the EOS Software are held by CERN.\n\nThe rights granted herein are limited to CERN's property rights in the EOS Software and do not include any other patents or intellectual property rights.\nRedistribution and use in source and binary forms are not permitted unless explicitly granted.\nCERN provides no express or implied warranties of any kind for the EOS sofware, including but not limited to those of merchantability, fitness for a particular purpose and non-infringement of the proprietary rights, such as copyrights, patents and trade secrets, of third parties. CERN accepts no liability for the EOS software including any third party material.\nThe software is not intended for use in which the failure of the software could lead to death, personal injury, or severe physical or environmental damage.\n";
/*----------------------------------------------------------------------------*/
#include "ConsoleMain.hh"
#include "../License"
/*----------------------------------------------------------------------------*/
extern int com_access (char*);
......@@ -617,12 +618,32 @@ std::string textbold("\033[1m");
std::string textunbold("\033[0m");
void usage() {
fprintf(stderr,"usage: eos [-r|--role <uid> <gid>] [-b|--batch] <mgm-url>\n");
fprintf(stderr," => run eos shell. Use -b for batch mode without colour output and syntax highlighting\n");
fprintf(stderr,"usage: eos [-r|--role <uid> <gid>] <mgm-url> <cmd> [<argN>]\n");
fprintf(stderr," => run <cmd> in eos shell\n");
fprintf(stderr,"usage: eos [-r|--role <uid> <gid>] <mgm-url> <filename>\n");
fprintf(stderr," =. run script <filename> in eos shell\n");
fprintf(stderr,"`eos' is the command line interface (CLI) of the EOS storage system.\n");
fprintf(stderr,"Usage: eos [-r|--role <uid> <gid>] [-b|--batch] [<mgm-url>] [<cmd> {<argN>}|<filename>.eosh]\n");
fprintf(stderr," -r, --role <uid> <gid> : select user role <uid> and group role <gid>\n");
fprintf(stderr," -b, --batch : run in batch mode without colour and syntax highlighting\n");
fprintf(stderr," -h, --help : print help text\n");
fprintf(stderr," -v, --version : print version information\n");
fprintf(stderr," <mgm-url> : xroot URL of the management server e.g. root://<hostname>[:<port>]\n");
fprintf(stderr," <cmd> : eos shell command (use 'eos help' to see available commands)\n");
fprintf(stderr," {<argN>} : single or list of arguments for the eos shell command <cmd>\n");
fprintf(stderr," <filename>.eosh : eos script file name ending with .eosh suffix\n\n");
fprintf(stderr,"Environment Variables: \n");
fprintf(stderr," EOS_MGM_URL : set's the redirector URL\n");
fprintf(stderr," EOS_HISTORY_FILE : set's the command history file - by default '$HOME/.eos_history' is used\n\n");
fprintf(stderr,"Return Value: \n");
fprintf(stderr," The return code of the last executed command is returned. 0 is returned in case of success otherwise <errno> (!=0).\n\n");
fprintf(stderr, "Examples:\n");
fprintf(stderr," eos : start the interactive eos shell client connected to localhost or URL defined in environment variabel EOS_MGM_URL\n");
fprintf(stderr," eos -r 0 0 : as before but take role root/root [only numeric IDs are supported]\n");
fprintf(stderr," eos root://myeos : start the interactive eos shell connecting to MGM host 'myeos'\n");
fprintf(stderr," eos -b whoami : run the eos shell command 'whoami' in batch mode without syntax highlighting\n");
fprintf(stderr," eos space ls --io : run the eos shell command 'space' with arguments 'ls --io'\n");
fprintf(stderr," eos --version : print version information\n");
fprintf(stderr," eos -b eosscript.eosh : run the eos shell script 'eosscript.eosh'. This script has to contain linewise commands which are understood by the eos interactive shell.\n");
fprintf(stderr,"Report bugs to eos-dev@cern.ch\n");
}
int main (int argc, char* argv[]) {
......@@ -657,10 +678,12 @@ int main (int argc, char* argv[]) {
if (in1.beginswith("-")) {
if ( (in1 != "--help") &&
(in1 != "--version") &&
(in1 != "--batch") &&
(in1 != "--role") &&
(in1 != "-h") &&
(in1 != "-b") &&
(in1 != "-v") &&
(in1 != "-r")) {
usage();
exit(-1);
......@@ -670,7 +693,14 @@ int main (int argc, char* argv[]) {
usage();
exit(-1);
}
if ( (in1 == "--version") || (in1 == "-v") ) {
fprintf(stderr,"EOS %s (CERN)\n\n", VERSION);
fprintf(stderr,"%s\n", license);
fprintf(stderr,"Written by CERN-IT-DSS (Andreas-Joachim Peters, Lukasz Janyst & Elvin Sindrilaru)\n");
exit(-1);
}
if ( (in1 == "--batch") || (in1 == "-b") ) {
interactive = false;
global_highlighting = false;
......@@ -708,7 +738,7 @@ int main (int argc, char* argv[]) {
if (in1.length()) {
// check if this is a file
if (!access(in1.c_str(), R_OK)) {
if ((in1.endswith(".eosh")) && (!access(in1.c_str(), R_OK))) {
// this is a script file
char str[16384];
fstream file_op(in1.c_str(),ios::in);
......
......@@ -584,7 +584,7 @@ com_fs (char* arg1) {
printf(" -fid : dump only a list of file id's stored on this filesystem\n");
printf(" -path : dump only a list of file names stored on this filesystem\n");
printf(" fs verify <fs-name>|<fs-id> [-checksum] [-commitchecksum] [-commitsize] [-rate <rate>]\n");
printf(" : schedule asynchronous replication [with checksumming] on a filesystem\n");
printf(" : schedule asynchronous verification [with checksumming] on a filesystem\n");
printf(" -checksum : trigger the checksum calculation during the verification process\n");
printf(" -commitchecksum : commit the computed checksum to the MGM\n");
printf(" -commitsize : commit the file size to the MGM\n");
......
......@@ -2,7 +2,7 @@
#include "console/ConsoleMain.hh"
/*----------------------------------------------------------------------------*/
#include "../../License"
extern char* license;
/* Display License File*/
int
......
......@@ -13,7 +13,7 @@ com_help (char *arg) {
{
if (!*arg || (strcmp (arg, commands[i].name) == 0))
{
printf ("%s\t\t%s.\n", commands[i].name, commands[i].doc);
printf ("%-20s %s\n", commands[i].name, commands[i].doc);
printed++;
}
}
......
......@@ -4,7 +4,7 @@
Summary: The EOS server installation.
Name: eos-server
Version: 0.1.0
Release: rc15
Release: rc16
Prefix: /usr
License: none
Group: Applications/File
......
No preview for this file type
......@@ -1266,21 +1266,16 @@ ProcCommand::open(const char* inpath, const char* ininfo, eos::common::Mapping::
if (subcmd == "add") {
if (vid_in.uid == 0) {
std::string sfsid = (opaque.Get("mgm.fs.fsid"))?opaque.Get("mgm.fs.fsid"):"0";
std::string uuid = (opaque.Get("mgm.fs.uuid"))?opaque.Get("mgm.fs.uuid"):"";
std::string nodename = (opaque.Get("mgm.fs.node"))?opaque.Get("mgm.fs.node"):"";
std::string mountpoint = (opaque.Get("mgm.fs.mountpoint"))?opaque.Get("mgm.fs.mountpoint"):"";
std::string space = (opaque.Get("mgm.fs.space"))?opaque.Get("mgm.fs.space"):"";
std::string configstatus = (opaque.Get("mgm.fs.configstatus"))?opaque.Get("mgm.fs.configstatus"):"";
eos::common::RWMutexWriteLock vlock(FsView::gFsView.ViewMutex);
retc = proc_fs_add(sfsid, uuid, nodename, mountpoint, space, configstatus, stdOut, stdErr, tident, vid_in);
} else {
retc = EPERM;
stdErr = "error: you have to take role 'root' to execute this command";
}
}
std::string sfsid = (opaque.Get("mgm.fs.fsid"))?opaque.Get("mgm.fs.fsid"):"0";
std::string uuid = (opaque.Get("mgm.fs.uuid"))?opaque.Get("mgm.fs.uuid"):"";
std::string nodename = (opaque.Get("mgm.fs.node"))?opaque.Get("mgm.fs.node"):"";
std::string mountpoint = (opaque.Get("mgm.fs.mountpoint"))?opaque.Get("mgm.fs.mountpoint"):"";
std::string space = (opaque.Get("mgm.fs.space"))?opaque.Get("mgm.fs.space"):"";
std::string configstatus = (opaque.Get("mgm.fs.configstatus"))?opaque.Get("mgm.fs.configstatus"):"";
eos::common::RWMutexWriteLock vlock(FsView::gFsView.ViewMutex);
retc = proc_fs_add(sfsid, uuid, nodename, mountpoint, space, configstatus, stdOut, stdErr, tident, vid_in);
}
if (subcmd == "mv") {
if (vid_in.uid == 0) {
......
......@@ -16,8 +16,6 @@ int main (int argc, char* argv[]) {
XrdMqMessage message("");
message.Configure(0);
EnvPutInt( NAME_DEBUG, 3);
if ( (argc < 2) || (argc > 5) ) {
fprintf(stderr, "usage: QueueDumper <brokerurl>/<queue> [n dumps] [sleep between grab] [debug]\n");
exit(-1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment