Index: trunk/ippTools/share/pubtool_definerun.sql
===================================================================
--- trunk/ippTools/share/pubtool_definerun.sql	(revision 25928)
+++ trunk/ippTools/share/pubtool_definerun.sql	(revision 25929)
@@ -11,4 +11,5 @@
     JOIN diffRun
     WHERE publishClient.stage = 'diff'
+        AND publishClient.active = 1
         AND diffRun.state = 'full'
     -- WHERE hook %s
@@ -21,4 +22,5 @@
     JOIN camRun
     WHERE publishClient.stage = 'camera'
+        AND publishClient.active = 1
         AND camRun.state = 'full'
     -- WHERE hook %s
Index: trunk/ippTools/share/pubtool_pending.sql
===================================================================
--- trunk/ippTools/share/pubtool_pending.sql	(revision 25928)
+++ trunk/ippTools/share/pubtool_pending.sql	(revision 25929)
@@ -24,4 +24,5 @@
     JOIN rawExp USING(exp_id)
     WHERE publishClient.stage = 'diff'
+        AND publishClient.active = 1
         AND publishRun.state = 'new'
         AND diffRun.state = 'full'
@@ -43,4 +44,5 @@
     JOIN rawExp USING(exp_id)
     WHERE publishClient.stage = 'camera'
+        AND publishClient.active = 1
         AND publishRun.state ='new'
         AND camRun.state = 'full'
Index: trunk/ippTools/share/pubtool_revert.sql
===================================================================
--- trunk/ippTools/share/pubtool_revert.sql	(revision 25928)
+++ trunk/ippTools/share/pubtool_revert.sql	(revision 25929)
@@ -3,3 +3,4 @@
 WHERE publishDone.pub_id = publishRun.pub_id
     AND publishRun.client_id = publishClient.client_id
+    AND publishClient.active = 1
     AND publishDone.fault != 0
Index: trunk/ippTools/share/pxadmin_create_tables.sql
===================================================================
--- trunk/ippTools/share/pxadmin_create_tables.sql	(revision 25928)
+++ trunk/ippTools/share/pxadmin_create_tables.sql	(revision 25929)
@@ -1485,4 +1485,5 @@
 CREATE TABLE publishClient (
     client_id BIGINT AUTO_INCREMENT, -- unique identifier
+    active TINYINT DEFAULT 0,        -- whether we should worry about this or not
     product VARCHAR(64),             -- product name
     stage VARCHAR(64) NOT NULL, -- stage of interest (chip, camera, diff, etc.)
Index: trunk/ippTools/src/pubtool.c
===================================================================
--- trunk/ippTools/src/pubtool.c	(revision 25928)
+++ trunk/ippTools/src/pubtool.c	(revision 25929)
@@ -32,4 +32,5 @@
 
 static bool defineclientMode(pxConfig *config);
+static bool updateclientMode(pxConfig *config);
 static bool definerunMode(pxConfig *config);
 static bool pendingMode(pxConfig *config);
@@ -57,4 +58,5 @@
     switch (config->mode) {
         MODECASE(PUBTOOL_MODE_DEFINECLIENT, defineclientMode);
+        MODECASE(PUBTOOL_MODE_UPDATECLIENT, updateclientMode);
         MODECASE(PUBTOOL_MODE_DEFINERUN, definerunMode);
         MODECASE(PUBTOOL_MODE_PENDING, pendingMode);
@@ -94,8 +96,50 @@
     PXOPT_LOOKUP_STR(comment, config->args, "-comment",  false, false);
 
-    if (!publishClientInsert(config->dbh, 0, product, stage, workdir, comment)) {
-        psError(PS_ERR_UNKNOWN, false, "Database error");
-        return false;
-    }
+    if (!publishClientInsert(config->dbh, 0, 0, product, stage, workdir, comment)) {
+        psError(PS_ERR_UNKNOWN, false, "Database error");
+        return false;
+    }
+
+    return true;
+}
+
+static bool updateclientMode(pxConfig *config)
+{
+    PS_ASSERT_PTR_NON_NULL(config, false);
+
+    psMetadata *where = psMetadataAlloc(); // WHERE conditions
+    PXOPT_COPY_S64(config->args, where, "-client_id", "client_id", "==");
+    PXOPT_COPY_STR(config->args, where, "-product", "product", "==");
+    PXOPT_COPY_STR(config->args, where, "-stage", "stage", "==");
+    PXOPT_COPY_STR(config->args, where, "-comment", "comment", "LIKE");
+
+    PXOPT_LOOKUP_BOOL(active, config->args, "-active",  false);
+    PXOPT_LOOKUP_BOOL(inactive, config->args, "-inactive",  false);
+
+    if ((!active && !inactive) || (active && inactive)) {
+        psError(PS_ERR_UNKNOWN, false, "Must specify one, and only one, of -active and -inactive.");
+        psFree(where);
+        return false;
+    }
+
+    psString query = NULL;              // Query to run
+    psStringAppend(&query, "UPDATE publishRun SET active = %d", active ? 1 : 0);
+
+    if (psListLength(where->list)) {
+        psString clause = psDBGenerateWhereConditionSQL(where, NULL);
+        psStringAppend(&query, "\n AND %s", clause);
+        psFree(clause);
+    }
+    psFree(where);
+
+    if (!p_psDBRunQuery(config->dbh, query)) {
+        psError(PS_ERR_UNKNOWN, false, "Database error");
+        psFree(query);
+        return false;
+    }
+    psFree(query);
+
+    long numUpdated = psDBAffectedRows(config->dbh);
+    psLogMsg("pubtool", PS_LOG_INFO, "%ld rows updated.", numUpdated);
 
     return true;
Index: trunk/ippTools/src/pubtool.h
===================================================================
--- trunk/ippTools/src/pubtool.h	(revision 25928)
+++ trunk/ippTools/src/pubtool.h	(revision 25929)
@@ -26,4 +26,5 @@
     PUBTOOL_MODE_NONE      = 0x0,
     PUBTOOL_MODE_DEFINECLIENT,
+    PUBTOOL_MODE_UPDATECLIENT,
     PUBTOOL_MODE_DEFINERUN,
     PUBTOOL_MODE_PENDING,
Index: trunk/ippTools/src/pubtoolConfig.c
===================================================================
--- trunk/ippTools/src/pubtoolConfig.c	(revision 25928)
+++ trunk/ippTools/src/pubtoolConfig.c	(revision 25929)
@@ -50,4 +50,13 @@
     psMetadataAddStr(defineclientArgs, PS_LIST_TAIL, "-comment", 0, "define comment", NULL);
 
+    // -updateclient
+    psMetadata *updateclientArgs = psMetadataAlloc();
+    psMetadataAddStr(updateclientArgs, PS_LIST_TAIL, "-client_id", 0, "search by client_id", NULL);
+    psMetadataAddStr(updateclientArgs, PS_LIST_TAIL, "-stage", 0, "search by stage", NULL);
+    psMetadataAddStr(updateclientArgs, PS_LIST_TAIL, "-product", 0, "search by product", NULL);
+    psMetadataAddStr(updateclientArgs, PS_LIST_TAIL, "-comment", 0, "search by comment (LIKE)", NULL);
+    psMetadataAddBool(updateclientArgs, PS_LIST_TAIL, "-active", 0, "set to active state", NULL);
+    psMetadataAddBool(updateclientArgs, PS_LIST_TAIL, "-inactive", 0, "set to inactive state", NULL);
+
     // -definerun
     psMetadata *definerunArgs = psMetadataAlloc();
@@ -85,4 +94,5 @@
 
     PXOPT_ADD_MODE("-defineclient", "", PUBTOOL_MODE_DEFINECLIENT, defineclientArgs);
+    PXOPT_ADD_MODE("-updateclient", "", PUBTOOL_MODE_UPDATECLIENT, updateclientArgs);
     PXOPT_ADD_MODE("-definerun", "", PUBTOOL_MODE_DEFINERUN, definerunArgs);
     PXOPT_ADD_MODE("-pending", "", PUBTOOL_MODE_PENDING, pendingArgs);
