Index: trunk/ippTasks/replicate.pro
===================================================================
--- trunk/ippTasks/replicate.pro	(revision 18381)
+++ trunk/ippTasks/replicate.pro	(revision 18404)
@@ -5,4 +5,8 @@
 # test for required global variables
 check.globals
+
+$NEB_DB   = nebulous
+$NEB_USER = nebulous
+$NEB_PASS = @neb@
 
 $LOGSUBDIR = $LOGDIR/replicate
@@ -37,4 +41,24 @@
 end
 
+macro set.host.for.replicate
+  if ($0 != 3)
+    echo "USAGE: set.host.for.replicate (host name)"
+    break
+  end
+
+  if (not($PARALLEL))
+    host local
+    return
+  end
+
+# parse volume name
+
+  if ("$host" == "NULL")
+    host anyhost
+  else
+    host $host
+  end
+end
+
 # the replicate process interacts with only the single Nebulous server
 
@@ -54,5 +78,5 @@
 
   # command does not need to be dynamic
-  command neb-load-replicants -limit 20
+  command neb-admin --db $NEB_DB --user $NEB_USER --pass $NEB_PASS --pendingreplicate --limit 100
 
   # success
@@ -97,8 +121,10 @@
 
     # XXX what values do I need to get back?
-    book getword replicatePending $pageName neb_id       -var NEB_ID
-    book getword replicatePending $pageName ncopies      -var NCOPIES
-    book getword replicatePending $pageName neb_host     -var NEB_HOST
-    book getword replicatePending $pageName target_host  -var TARGET_HOST
+    book getword replicatePending $pageName key         -var KEY
+    book getword replicatePending $pageName need_copies -var NEED_COPIES
+    book getword replicatePending $pageName volume_name -var VOLUME_NAME
+    book getword replicatePending $pageName volume_host -var VOLUME_HOST
+
+    set.host.for.replicate $VOLUME_HOST
 
     stdout NULL
@@ -106,5 +132,5 @@
 
     # these operations do not require a database to be specified
-    $run = replicate_object.pl --neb_id $NEB_ID --ncopies $NCOPIES --neb_host $NEB_HOST
+    $run = neb-replicate --copies $NEED_COPIES $KEY
 
     # save the pageName for future reference below
