summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--SConstruct2
-rw-r--r--dbgrid/server.cpp (renamed from dbgrid/dbgrid.cpp)14
3 files changed, 9 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 5da93e7ab60..3f5da5e3930 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,6 +38,7 @@ scratch
mongo
mongod
mongogrid
+mongos
mongodump
mongofiles
mongoexport
diff --git a/SConstruct b/SConstruct
index 473f45de6a7..c19b8f90381 100644
--- a/SConstruct
+++ b/SConstruct
@@ -422,7 +422,7 @@ env.Program( "mongoimport" , allToolFiles + [ "tools/import.cpp" ] )
env.Program( "mongoimportjson" , allToolFiles + [ "tools/importJSON.cpp" ] )
# dbgrid
-env.Program( "mongogrid" , commonFiles + coreDbFiles + Glob( "dbgrid/*.cpp" ) )
+env.Program( "mongos" , commonFiles + coreDbFiles + Glob( "dbgrid/*.cpp" ) )
# c++ library
env.Library( "mongoclient" , allClientFiles )
diff --git a/dbgrid/dbgrid.cpp b/dbgrid/server.cpp
index f1d6b873f7b..04f668f75bf 100644
--- a/dbgrid/dbgrid.cpp
+++ b/dbgrid/server.cpp
@@ -1,4 +1,4 @@
-// dbgrid.cpp
+// server.cpp
/**
* Copyright (C) 2008 10gen Inc.
@@ -34,8 +34,8 @@ namespace mongo {
return "?";
}
- void usage() {
- out() << "Mongo dbgrid usage:\n\n";
+ void usage( char * argv[] ){
+ out() << argv[0] << " usage:\n\n";
out() << " --port <portno>\n";
out() << " --griddb <griddbname> [<griddbname>...]\n";
out() << " --infer infer griddbname by replacing \"-n<n>\"\n";
@@ -121,7 +121,7 @@ using namespace mongo;
int main(int argc, char* argv[], char *envp[] ) {
if ( argc <= 1 ) {
- usage();
+ usage( argv );
return 3;
}
@@ -151,7 +151,7 @@ int main(int argc, char* argv[], char *envp[] ) {
}
}
else {
- usage();
+ usage( argv );
return 3;
}
}
@@ -159,11 +159,11 @@ int main(int argc, char* argv[], char *envp[] ) {
bool ok = port != 0;
if ( !ok ) {
- usage();
+ usage( argv );
return 1;
}
- log() << "dbgrid starting (--help for usage)" << endl;
+ log() << argv[0] << " starting (--help for usage)" << endl;
UnitTest::runTests();
start();
dbexit(0);