Index: trunk/ippTasks/pantasks.pro
===================================================================
--- trunk/ippTasks/pantasks.pro	(revision 16305)
+++ trunk/ippTasks/pantasks.pro	(revision 16306)
@@ -24,14 +24,7 @@
 $DB:n = 0
 
-if ($NEBULOUS)
- $default_host     = anyhost
- $default_volume   = none
- # $default_host     = ipp004
- # $workdir_template = neb:///@HOST@-v0
- # $default_volume   = ipp004-v0
- # $volume_template  = 
-else
- $default_host     = anyhost
-end
+# very basic values: set these with init.copy.mhpcc
+$default_host     = anyhost
+$workdir_template = `pwd`
 
 # user function to add databases by name (avoids duplicates)
@@ -69,11 +62,9 @@
   end
 
-### XXX There is a bug in the below "list DB -del $1" line.
-  echo "This function doesn't work"
-#  list DB -del $1
+  list DB -del $1
 end
 
 macro init.cluster.po
-  $parallel = 1
+  $PARALLEL = 1
   controller exit true
 
@@ -107,5 +98,5 @@
 
 macro init.cluster.sn
-  $parallel = 1
+  $PARALLEL = 1
   controller exit true
   controller host add sn2
@@ -123,7 +114,51 @@
 end
 
+macro init.cluster.mhpcc
+  $PARALLEL = 1
+  controller exit true
+  controller host add ipp005
+  controller host add ipp006
+  controller host add ipp007
+  controller host add ipp008
+  controller host add ipp009
+  controller host add ipp010
+  controller host add ipp011
+  controller host add ipp016
+  controller host add ipp020
+  controller host add ipp021
+end
+
+macro init.copy.mhpcc
+ if ($0 != 2)
+   echo "USAGE: init.copy.mhpcc (nebulous)"
+   echo "nebulous may be 'on' or 'off'"
+   break
+ end
+
+ if (("$1" != "on") && ("$1" != "off")) 
+   echo "USAGE: init.copy.mhpcc (nebulous)"
+   echo "nebulous may be 'on' or 'off'"
+   break
+ end
+ 
+ # the templates are used if we have a class_id/host relationship; 
+ # if none is found, the default values are used
+ # XXX not sure how to handle the .N value if we need to use more than one
+ # XXX this stuff should all be placed in a 'site' config file
+
+ if ("$1" == "on")
+  $NEBULOUS = 1
+  $default_host     = ipp004
+  $workdir_template = neb://@HOST@.0
+ else
+  $NEBULOUS = 0
+  $default_host     = ipp004
+  $workdir_template = /data/@HOST@.0
+ end
+end
+
 macro init.simtest.local
   list DB -add simtest
-  $parallel = 0
+  $PARALLEL = 0
   controller exit true
 end
@@ -131,5 +166,5 @@
 macro init.simtest.default.db
   $host = `hostname`
-  if ($parallel) 
+  if ($PARALLEL) 
     controller exit true
     controller host add $host
@@ -141,5 +176,5 @@
 
   $host = `hostname`
-  if ($parallel) 
+  if ($PARALLEL) 
     controller exit true
     controller host add $host
@@ -355,5 +390,4 @@
   if ($0 != 6)
     echo "USAGE: set.workdir.by.camera (camera) (class_id) (template) (default) (varname)"
-    echo " uses global variable NEBULOUS to determine if nebulous is active"
     break
   end
@@ -412,5 +446,5 @@
   end
 
-  if (not($parallel))
+  if (not($PARALLEL))
     host local
     return
@@ -427,4 +461,9 @@
 end
 
+macro load.chiphost.table
+  queueload tmp -x "cat $MODULES:0/chiphosts.config"
+  ipptool2book tmp chiphosts -key camera
+end
+
 macro check.globals
   if ($?NETWORK == 0)
