* Added a subcommand to the migrator to list out all of the directories which require...
authorArt Cancro <ajc@citadel.org>
Fri, 24 Apr 2009 02:09:30 +0000 (02:09 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 24 Apr 2009 02:09:30 +0000 (02:09 +0000)
citadel/citadel_dirs.c
citadel/modules/migrate/serv_migrate.c

index 770ee0d5bcaae1212fa742d32c4ac9d8d52b5fbd..6aa74959b267d5689bca109c0fcf55db2ce03691 100644 (file)
@@ -1,5 +1,3 @@
-#include "sysdep.h"
-#include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <sys/stat.h>
index b440ff3b4ebecb75ae8c2f91a058cd277d6e6b29..4857f96f684f5b99d3322155642b7190df2acfc8 100644 (file)
@@ -896,6 +896,23 @@ void migr_do_import(void) {
 
 
 
+/*
+ * Dump out the pathnames of directories which can be copied "as is"
+ */
+void migr_do_listdirs(void) {
+       cprintf("%d Don't forget these:\n", LISTING_FOLLOWS);
+       cprintf("bio|%s\n",             ctdl_bio_dir);
+       cprintf("files|%s\n",           ctdl_file_dir);
+       cprintf("userpics|%s\n",        ctdl_usrpic_dir);
+       cprintf("messages|%s\n",        ctdl_message_dir);
+       cprintf("netconfigs|%s\n",      ctdl_netcfg_dir);
+       cprintf("keys|%s\n",            ctdl_key_dir);
+       cprintf("images|%s\n",          ctdl_image_dir);
+       cprintf("info|%s\n",            ctdl_info_dir);
+       cprintf("000\n");
+}
+
+
 /*
  * Common code appears in this section
  */
@@ -918,6 +935,9 @@ void cmd_migr(char *cmdbuf) {
                else if (!strcasecmp(cmd, "import")) {
                        migr_do_import();
                }
+               else if (!strcasecmp(cmd, "listdirs")) {
+                       migr_do_listdirs();
+               }
                else {
                        cprintf("%d illegal command\n", ERROR + ILLEGAL_VALUE);
                }