Index: trunk/Ohana/src/opihi/cmd.basic/Makefile
===================================================================
--- trunk/Ohana/src/opihi/cmd.basic/Makefile	(revision 27254)
+++ trunk/Ohana/src/opihi/cmd.basic/Makefile	(revision 27255)
@@ -40,4 +40,5 @@
 $(SRC)/module.$(ARCH).o     \
 $(SRC)/nop.$(ARCH).o        \
+$(SRC)/opihi.$(ARCH).o     \
 $(SRC)/output.$(ARCH).o     \
 $(SRC)/quit.$(ARCH).o	     \
Index: trunk/Ohana/src/opihi/cmd.basic/init.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.basic/init.c	(revision 27254)
+++ trunk/Ohana/src/opihi/cmd.basic/init.c	(revision 27255)
@@ -26,4 +26,5 @@
 int module          PROTO((int, char **));
 int nop             PROTO((int, char **));
+int opihi_setmode   PROTO((int, char **));
 int output          PROTO((int, char **));
 int pwd             PROTO((int, char **));
@@ -74,4 +75,5 @@
   {1, "module",        module,             "load script file from the modules directories"},
   {1, "nop",           nop,                "a NOP function"},
+  {1, "opihi",         opihi_setmode,      "get / set opihi behavior options"},
   {1, "output",        output,             "redirect output to file"},
   {1, "pwd",           pwd,                "print current working directory"},
Index: trunk/Ohana/src/opihi/cmd.basic/opihi.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.basic/opihi.c	(revision 27255)
+++ trunk/Ohana/src/opihi/cmd.basic/opihi.c	(revision 27255)
@@ -0,0 +1,36 @@
+# include "basic.h"
+
+int opihi_setmode (int argc, char **argv) {
+
+  int value;
+
+  if (argc < 2) {
+    gprint (GP_ERR, "USAGE: opihi (verbose) [on/off]\n");
+    return (FALSE);
+  }
+
+  if (!strcasecmp(argv[1], "verbose")) {
+      if (argc == 2) {
+	  value = get_verbose_shell();
+	  if (value) {
+	    gprint (GP_ERR, "opihi verbose mode: on\n");
+	  } else {
+	    gprint (GP_ERR, "opihi verbose mode: off\n");
+	  }
+	  return (TRUE);
+      }
+      if (!strcasecmp(argv[2], "on")) {
+	set_verbose_shell (TRUE);
+	return (TRUE);
+      }
+      if (!strcasecmp(argv[2], "off")) {
+	set_verbose_shell (FALSE);
+	return (TRUE);
+      }
+      gprint (GP_ERR, "unknown verbose mode %s\n", argv[2]);
+      return (FALSE);
+  }
+
+  gprint (GP_ERR, "unknown mode %s\n", argv[1]);
+  return (FALSE);
+}
Index: trunk/Ohana/src/opihi/include/shell.h
===================================================================
--- trunk/Ohana/src/opihi/include/shell.h	(revision 27254)
+++ trunk/Ohana/src/opihi/include/shell.h	(revision 27255)
@@ -70,4 +70,7 @@
 
 int           command               	PROTO((char *line, char **outline, int VERBOSE));
+void          set_verbose_shell         PROTO((int mode));
+int           get_verbose_shell         PROTO((void));
+
 char         *expand_vars           	PROTO((char *line));
 char         *expand_vectors        	PROTO((char *line));
Index: trunk/Ohana/src/opihi/lib.shell/command.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/command.c	(revision 27254)
+++ trunk/Ohana/src/opihi/lib.shell/command.c	(revision 27255)
@@ -1,4 +1,6 @@
 # include "opihi.h"
 # define DEBUG 0
+
+static int VERBOSE_SHELL = FALSE;
 
 int command (char *line, char **outline, int VERBOSE) {
@@ -29,7 +31,5 @@
   *outline = line;
   
-  # if (DEBUG) 
-  fprintf (stderr, "line: %s\n", line);
-  # endif
+  if (VERBOSE_SHELL) gprint (GP_ERR, "opihi: %s\n", line);
 
   argv = parse_commands (line, &argc);
@@ -60,5 +60,5 @@
     msg = get_variable_ptr ("ERRORMSG");
     if (msg != (char *) NULL) gprint (GP_ERR, "%s\n", msg);
-    // gprint (GP_ERR, "error on line: %s\n", rawline);
+    if (VERBOSE_SHELL) gprint (GP_ERR, "error on line: %s\n", rawline);
   }
 
@@ -73,4 +73,14 @@
 }
 
+void set_verbose_shell(int mode) {
+    VERBOSE_SHELL = mode;
+}
+
+int get_verbose_shell(void) {
+    return VERBOSE_SHELL;
+}
+
+    
+
 /* parse the input line, search for the corresponding command, and execute it
    if no match is found, return -1; this is used above to distinguish between
Index: trunk/Ohana/src/opihi/lib.shell/gprint.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/gprint.c	(revision 27254)
+++ trunk/Ohana/src/opihi/lib.shell/gprint.c	(revision 27255)
@@ -305,4 +305,5 @@
   if (stream[0].mode == GP_FILE) {
     status = vfprintf (stream[0].file, format, argp);
+    fflush (stream[0].file);
     if (status < 0) {
       return (FALSE);
@@ -325,4 +326,5 @@
   if (stream[0].mode == GP_FILE) {
     fwrite (buffer, size, N, stream[0].file);
+    fflush (stream[0].file);
   } else {
     // XXX can we not use exising IOBuffer APIs here?
Index: trunk/Ohana/src/opihi/pantasks/test/threadload.sh
===================================================================
--- trunk/Ohana/src/opihi/pantasks/test/threadload.sh	(revision 27254)
+++ trunk/Ohana/src/opihi/pantasks/test/threadload.sh	(revision 27255)
@@ -31,5 +31,5 @@
   # default exit status
   task.exit    default
-    echo       "basic: exit status: $EXIT"
+    echo       "basic: exit status: $JOB_STATUS"
   end
 
@@ -65,5 +65,5 @@
   # default exit status
   task.exit    default
-    echo       "basic: exit status: $EXIT"
+    echo       "basic: exit status: $JOB_STATUS"
   end
 
@@ -99,5 +99,5 @@
   # default exit status
   task.exit    default
-    echo       "basic: exit status: $EXIT"
+    echo       "basic: exit status: $JOB_STATUS"
   end
 
