Index: /branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/addstar_create_ID.c
===================================================================
--- /branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/addstar_create_ID.c	(revision 35695)
+++ /branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/addstar_create_ID.c	(revision 35696)
@@ -10,4 +10,5 @@
   /*** update the image table ***/
   /* setup image table format and lock */
+  // gfits_db_init (&db);
   db.mode   = dvo_catalog_catmode (CATMODE);
   db.format = dvo_catalog_catformat (CATFORMAT);
@@ -19,12 +20,16 @@
     if (VERBOSE) fprintf (stderr, "can't find %s, creating a new one\n", ImageCat);
     dvo_image_create (&db, GetZeroPoint());
-  } else {
-    if (!dvo_image_load (&db, VERBOSE, FORCE_READ)) {
-      Shutdown ("can't read image catalog %s", db.filename);
-    }
-    if (!dvo_image_createID (&db.header)) {
-      fprintf (stderr, "failed to add database ID\n");
-      exit (1);
-    }
+    // if (!gfits_table_to_vtable (&db[0].ftable, &db[0].vtable, 0, 0)) return (FALSE);
+    dvo_image_save (&db, VERBOSE);
+    dvo_image_unlock (&db);
+    return TRUE;
+  } 
+
+  if (!dvo_image_load (&db, VERBOSE, FORCE_READ)) {
+    Shutdown ("can't read image catalog %s", db.filename);
+  }
+  if (!dvo_image_createID (&db.header)) {
+    fprintf (stderr, "failed to add database ID\n");
+    exit (1);
   }
   fseeko (db.f, 0, SEEK_SET);
Index: /branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/args.c
===================================================================
--- /branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/args.c	(revision 35695)
+++ /branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/args.c	(revision 35696)
@@ -419,4 +419,6 @@
   fprintf (stderr, "  addstar -pmm (filename)");
   fprintf (stderr, "     insert pmm table into database\n\n");
+  fprintf (stderr, "  addstar -create-id");
+  fprintf (stderr, "     add a dvodb ID to the image table (and exit)\n\n");
 
   fprintf (stderr, "  optional flags:\n");
