* Added "-i" flag to netproc to make it skip the export phase.
authorArt Cancro <ajc@citadel.org>
Sat, 19 Dec 1998 19:02:48 +0000 (19:02 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 19 Dec 1998 19:02:48 +0000 (19:02 +0000)
          Updated other programs to call netproc in this way when appropriate.
        * Updated network.txt to reflect the usage for netproc (which has
          been wrong for several releases)

citadel/ChangeLog
citadel/aidepost.c
citadel/citmail.c
citadel/file_ops.c
citadel/msgbase.c
citadel/netmailer.c
citadel/netproc.c
citadel/network.txt
citadel/rcit.c

index 72c2b3c56015717f877d2bb229595048b2931c6a..4b129e8660f9fa6f2effff0853cf09ffa909245b 100644 (file)
@@ -1,3 +1,9 @@
+Sat Dec 19 13:57:48 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
+       * Added "-i" flag to netproc to make it skip the export phase.
+         Updated other programs to call netproc in this way when appropriate.
+       * Updated network.txt to reflect the usage for netproc (which has
+         been wrong for several releases)
+
 Thu Dec 17 00:17:04 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Started removing the word "beta" from the docs and code.
          Preparing for an actual release.
index 04b9b86eeeb2c3594a32cf392d062e08c8aeca50..5c4ecdeae437027369ec138514fc32a9da8ebf5a 100644 (file)
@@ -59,7 +59,7 @@ int main(int argc, char **argv)
        snprintf(movecmd, sizeof movecmd, "/bin/mv %s %s", temptmp, tempspool);
        system(movecmd);
 
-       execlp("./netproc","netproc",NULL);
+       execlp("./netproc", "netproc", "-i", NULL);
        fprintf(stderr,"aidepost: could not run netproc\n");
        exit(1);
        }
index 9581ca1996d7e091ae58354224b09b49e2b7967b..0a80370f3ccc0419c246481450fbe9dc6f6543ba 100644 (file)
@@ -682,7 +682,7 @@ int main(int argc, char **argv)
                }
        
        closelog();
-       if (RUN_NETPROC) execlp("./netproc","netproc",NULL);
+       if (RUN_NETPROC) execlp("./netproc", "netproc", "-i", NULL);
        exit(0);
        }
 
index 3043737d4e4c4b19bb23cb26f580798b665a90f7..e83ba34a95a2a0dbfd91f157f01d6ad0dac8af48 100644 (file)
@@ -220,7 +220,7 @@ void cmd_netf(char *cmdbuf)
        fclose(ofp);
 
        cprintf("%d File '%s' has been sent to %s.\n",OK,filename,destsys);
-       system("nohup ./netproc >/dev/null 2>&1 &");
+       system("nohup ./netproc -i >/dev/null 2>&1 &");
        return;
        }
 
index 02df56809290049a6c9f2db0c96fb54cb1d2ea07..51fbc20d4fbc1e6005b61e54972e03a91d5fbbb5 100644 (file)
@@ -825,7 +825,7 @@ void save_message(char *mtmp,       /* file containing proper message */
                sprintf(aaa,"./network/spoolin/netmail.%04x.%04x.%04x",
                        getpid(), CC->cs_pid, ++seqnum);
                copy_file(mtmp,aaa);
-               system("exec nohup ./netproc >/dev/null 2>&1 &");
+               system("exec nohup ./netproc -i >/dev/null 2>&1 &");
                }
 
        /* Bump this user's messages posted counter. */
index 91b0573db00faf090039b98ba8b0755c97e4dcab..fc710020bb8fe2c75bb68f31a55c2adf726ad19e 100644 (file)
@@ -267,5 +267,6 @@ int main(int argc, char **argv)
        pclose(rmail);
   
        unlink(temp);           /* get rid of the ASCII file */
+       execlp("./netproc", "netproc", "-i", NULL);
        exit(0);                /* go back to the main program */
        }
index bffc389425ca77da7fecb7b1164553ba6bbe5b43..61d0362dbae878b9d2d5f0b3104c3ffab55a4ca6 100644 (file)
@@ -1227,6 +1227,7 @@ int main(int argc, char **argv)
        char allst[32];
        FILE *allfp;
        int a;
+       int import_only = 0;    /* if set to 1, don't export anything */
 
 
        strcpy(bbs_home_directory, BBSDIR);
@@ -1240,8 +1241,12 @@ int main(int argc, char **argv)
                        strcpy(bbs_home_directory, &bbs_home_directory[2]);
                        home_specified = 1;
                        }
+               if (!strcmp(argv[a], "-i")) {
+                       import_only = 1;
+                       }
                else {
-                       fprintf(stderr, "netproc: usage: netproc [-hHomeDir]\n");
+                       fprintf(stderr, "netproc: usage: ");
+                       fprintf(stderr, "netproc [-hHomeDir] [-i]\n");
                        exit(1);
                        }
                }
@@ -1272,16 +1277,19 @@ int main(int argc, char **argv)
 
        inprocess();    /* first collect incoming stuff */
 
-       allfp=(FILE *)popen("cd ./network/systems; ls","r");
-       if (allfp!=NULL) {
-               while (fgets(allst,32,allfp)!=NULL) {
-                       allst[strlen(allst)-1] = 0;
-                       outprocess(allst);
+       if (import_only != 1) {
+               allfp=(FILE *)popen("cd ./network/systems; ls","r");
+               if (allfp!=NULL) {
+                       while (fgets(allst,32,allfp)!=NULL) {
+                               allst[strlen(allst)-1] = 0;
+                               outprocess(allst);
+                               }
+                       pclose(allfp);
                        }
-               pclose(allfp);
+               /* import again in case anything new was generated */
+               inprocess();
                }
 
-       inprocess();    /* incoming again in case anything new was generated */
        rewrite_syslist();
        printf("netproc: processing ended.\n");
        cleanup(0);
index 74532e82bb5d4493e84f2126232b1cf8bd343fd9..68c540506816948353fe197578f4206c1eb9b47c 100644 (file)
@@ -72,18 +72,19 @@ the .<A>ide <E>ditRoom command.
    
   
   USING NETPROC
-  
-   Calling netproc with no arguments simply looks in the network/spoolin
-directory for newly arrived messages, and posts them if it finds any.
-   To batch new messages and send them off to a remote system, the usage
-  
- netproc sysname
-  
- will do outbound network processing for system "sysname". It is recommended
+   
+   
+   Calling netproc with no arguments causes it to look in the network/spoolin
+directory for newly arrived messages, and posts them if it finds any.  It then
+automatically batches up new messages on your system to be sent to your net
+neighbors, and exports those messages to them.  It is recommended
 that you use the cron program to handle your network processing on a routine
 basis automatically.  Arrange with your netneighbors for both of your systems
 to batch new messages before actual polls take place, to guarantee that
 messages travel across the network as quickly as possible.
+   Calling netproc with the -i flag causes it to skip the export phase, and
+handle incoming messages only.
    
    
   NETWORKING WITH A USENET NEWS SITE
index 60c073dc89a123f083e13555a91a1cd323e36c2c..51917d0a4562a04df802883a265008bee488913c 100644 (file)
@@ -232,7 +232,7 @@ END:        putc(0,mout);
        fclose(mout);
        unlink(tname);
        if (compressed_input) pclose(minput);
-       if (!spool_only) execlp("./netproc","netproc",NULL);
+       if (!spool_only) execlp("./netproc", "netproc", "-i", NULL);
        exit(0);
 }