[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Runnning examples



Here is the patch for the work around to the equal (=) in the command line
on windows 2000 (see below for details).

I hope this list accepts attachments...

Regards,

Rob Lapensee
Director of Technology
Delfour Corporation
www.delfour.com
rlapensee@delfour.com

-----Original Message-----
From: ozone-users-owner@ozone-db.org
[mailto:ozone-users-owner@ozone-db.org]On Behalf Of Falko Braeutigam
Sent: Tuesday, May 01, 2001 8:23 AM
To: Rob Lapensee; ozone-users@ozone-db.org
Subject: RE: Runnning examples

On Tue, 01 May 2001, Rob Lapensee wrote:
> Ok, by tracing down the ozoneAdmin script and .java program, in both
windows
> 2000 and UWIN (unix command in windows), I have discovered a problem.
>
> The command works under UWIN (and presumably all UNIX), but does not work
> under windows 2000.
>
> The reason is that the argument list removes the equal (=) and beaks up
the
> command line.
>
> It looks like this under windows 2000:
>
> _args.length: 5
> i: 0<newuser>
> i: 1<-name>
> i: 2<jack9>
> i: 3<-id>
> i: 4<209>
>
> but it looks like this under UWIN:
>
> _args.length: 3
> i: 0<newuser>
> i: 1<-name=jack10>
> i: 2<-id=210>
>
> and here is a quick work around for windows users:
> ozoneAdmin newuser "-name=jack11"  "-id=211"
>
> this also works under UWIN (and presumably UNIX)
>
> My suggested fix for this would be to alter the documentation and the list
> of options that print from the ozoneAdmin command with no arguments.
>
> For example, the ozoneAdmin with no arguments now shows (for new user):
>
> newuser options:
>    -name=<username>
>    -id=<userid>
>
> alter it to say:
>
> newuser options:
>    "-name=<username>"
>    "-id=<userid>"
>
>
> and at the top put:
>       double quotes around the -name=value are mandatory for Windows
systems.

We may change the param style later. But for now this is a good workaround.
Thanks for the great work, Rob!

>
> If everyone is OK with this, I could fix it, except I would need to know
how
> to get the AdminClient.java program back into the CVS repository.

checkout the v1_0 brach of the CVS. Do your changes. Do a 'cvs diff -u
.../AdminClient.java > patch'. And send this patch to the dev list. As soon
as
this patch is in the CVS we should release 1.0.1


Falko
--
______________________________________________________________________
Falko Braeutigam                              mailto:falko@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com
Index: org/ozoneDB/core/admin/AdminClient.java
===================================================================
RCS file: /raid/Repository/ozone/org/ozoneDB/core/admin/AdminClient.java,v
retrieving revision 1.5
diff -u -r1.5 AdminClient.java
--- org/ozoneDB/core/admin/AdminClient.java	2001/04/18 11:35:58	1.5
+++ org/ozoneDB/core/admin/AdminClient.java	2001/05/01 13:07:55
@@ -123,43 +123,48 @@
     } 
     
     
+// note that on windows systems the equal (=) gets removed and breaks
+// the command line into too many arguments
+// as a work around, the -name=value in double quotes like
+// "-name=value" allows both Windows and UNIX to work correctly
     public static void printUsage() {
         System.out.println( "usage: ozoneAdmin <command> [options]" );
         System.out.println( "commands: " + COMMAND_NU + " " + COMMAND_RU + " " + COMMAND_AU + " " + 
                 COMMAND_NG + " " + COMMAND_RG + " " + COMMAND_AG + " " + 
                 COMMAND_TXS + " " + COMMAND_BACKUP + " " + COMMAND_RESTORE );
+        System.out.println("note: all -name=value must be within double quotes for Windows systems");
         System.out.println( "overall options:" );
-        System.out.println( "   -dburl=<URL>          The URL of the database. (default: " + DB_URL + ")" );
-        System.out.println( "   -verbose              Be verbose." );
+        System.out.println( "   \"-dburl=<URL>\"          The URL of the database. (default: " + DB_URL + ")" );
+        System.out.println( "   \"-verbose\"              Be verbose." );
         System.out.println( COMMAND_NU + " options:" );
-        System.out.println( "   -name=<username>" );
-        System.out.println( "   -id=<userid>" );
+        System.out.println( "   \"-name=<username>\"" );
+        System.out.println( "   \"-id=<userid>\"" );
         System.out.println( COMMAND_RU + " options:" );
-        System.out.println( "   -name=<username>" );
+        System.out.println( "   \"-name=<username>\"" );
         System.out.println( COMMAND_AU + " options:" );
         System.out.println( "   -" );
         System.out.println( COMMAND_NG + " options:" );
-        System.out.println( "   -name=<groupname>" );
-        System.out.println( "   -id=<groupid>" );
+        System.out.println( "   \"-name=<groupname>\"" );
+        System.out.println( "   \"-id=<groupid>\"" );
         System.out.println( COMMAND_RG + " options:" );
-        System.out.println( "   -name=<groupname>" );
+        System.out.println( "   \"-name=<groupname>\"" );
         System.out.println( COMMAND_AG + " options:" );
         System.out.println( "   -" );
         System.out.println( COMMAND_U2G + " options:" );
-        System.out.println( "   -username=<username>" );
-        System.out.println( "   -groupname=<groupname>" );
+        System.out.println( "   \"-username=<username>\"" );
+        System.out.println( "   \"-groupname=<groupname>\"" );
         System.out.println( COMMAND_TXS + " options:" );
         System.out.println( "   -" );
         System.out.println( COMMAND_SD + " options:" );
         System.out.println( "   -" );
         System.out.println( COMMAND_BACKUP + " options:" );
-        System.out.println( "   -outfile=<filename>   The name of the output file. (default: System.out)" );
-        System.out.println( "   -compress             gzip the output." );
-        System.out.println( "   -indent               Indent the XML output." );
-       // System.out.println( "   -raw         Write compiled XML." );
+        System.out.println( "   \"-outfile=<filename>\"   The name of the output file. (default: System.out)" );
+        System.out.println( "   \"-compress\"             gzip the output." );
+        System.out.println( "   \"-indent\"               Indent the XML output." );
+       // System.out.println( "   \"-raw\"         Write compiled XML." );
         System.out.println( COMMAND_RESTORE + " options:" );
-        System.out.println( "   -infile=<filename>    The name of the input file. (default: System.in)" );
-        System.out.println( "   -compress             Input is gzipped." );
+        System.out.println( "   \"-infile=<filename>\"    The name of the input file. (default: System.in)" );
+        System.out.println( "   \"-compress\"             Input is gzipped." );
     }