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)
+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.
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);
}
}
closelog();
- if (RUN_NETPROC) execlp("./netproc","netproc",NULL);
+ if (RUN_NETPROC) execlp("./netproc", "netproc", "-i", NULL);
exit(0);
}
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;
}
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. */
pclose(rmail);
unlink(temp); /* get rid of the ASCII file */
+ execlp("./netproc", "netproc", "-i", NULL);
exit(0); /* go back to the main program */
}
char allst[32];
FILE *allfp;
int a;
+ int import_only = 0; /* if set to 1, don't export anything */
strcpy(bbs_home_directory, BBSDIR);
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);
}
}
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);
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
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);
}