From 2e4eb31b7e06a31b46c05b0f5419f53e22db5d66 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sat, 26 Jan 2002 21:46:37 +0000 Subject: [PATCH] Small fixes for mbfile --- html/programs/mbfile.html | 35 +++++++++++++++++++++++++---------- lang/dutch.txt | 2 +- mbfido/mbfdel.c | 4 ++-- mbfido/mbfile.c | 2 +- mbfido/mbfimport.c | 6 +++--- mbfido/mbfindex.c | 4 ++++ mbfido/mbfutil.c | 1 + mbsetup/m_node.c | 2 +- 8 files changed, 38 insertions(+), 18 deletions(-) diff --git a/html/programs/mbfile.html b/html/programs/mbfile.html index b1955d7d..fc4740bc 100644 --- a/html/programs/mbfile.html +++ b/html/programs/mbfile.html @@ -12,7 +12,7 @@
-
Last update 25-Jan-2002
+
Last update 26-Jan-2002

mbfile - File database maintenance program.

@@ -37,6 +37,8 @@ from the crontab. example:

 30 05 * * * export MBSE_ROOT=/opt/mbse; /opt/mbse/bin/mbfile kill pack check index -quiet
 
+Other functions in mbfile are meant to do manual maintenance such as +adding, deleting or moving files.

 

Environment.

@@ -75,23 +77,36 @@ The file is not removed until you run mbfile pack.

mbfile import <area> -Import files to the given area using files.bbs descriptions. -You need to be in the area where the files are stored. -There must also be the files.bbs file present, if not then in the area setup -you must enter the full filename and path where the files.bbs is. This may -be needed for some CD-roms where the files.bbs is not in the same directory -as where the files are. The files are not checked for FILE_ID.DIZ inside the +Import files to the given area using files.bbs descriptions. There are two +possibilities, import from CD-rom or just from a temporary directory. +

+To start the import, type mbfile import area where area is the +number of the destination filearea. +The files are not checked for FILE_ID.DIZ inside the archives. If you have virus scanners defined, the files are checked for -virussed before they are added the the bbs. +virusses before they are added the the bbs. If you don't want these fresh files +to be announced, add the -announce option on the commandline. This +may be a good idea if you migrate from another bbs system.

mbfile index Create fast filerequest index for the mbcico filerequest processor. In each directory with the downloadable files is also a -files.bbs file written is msdos cr/lf format. This includes a +files.bbs file written in msdos cr/lf format. This includes a download counter. Also, if defined, in each available download area for ftp/http, index files are -created, starting at the ftp pub directory. +created, starting at the ftp pub directory. If the area contains gif or jpg +images, thumbnails are created using the convert program if you have that +installed. The thumbnails have the same filenames as the original images, only +they start with a dot. The convert command is defined with mbsetup menu +1.19.8, if you don't have it or don't want thumbnails, make that entry empty.

mbfile kill diff --git a/lang/dutch.txt b/lang/dutch.txt index eb50c092..0eea10dc 100644 --- a/lang/dutch.txt +++ b/lang/dutch.txt @@ -203,7 +203,7 @@ JN|Wet U het zeker [j/N]: |Opslaan bericht op disk |Geef regel # te centreren |De regel is op maximale breedte en kan niet worden gecentreerd. -|Er zijn geen breichten in dit gebied. +|Er zijn geen berichten in dit gebied. |Datum : JN=|Meer (J/n/=/Gebied #): |Aan : diff --git a/mbfido/mbfdel.c b/mbfido/mbfdel.c index defef0ed..a74e7dc9 100644 --- a/mbfido/mbfdel.c +++ b/mbfido/mbfdel.c @@ -101,9 +101,9 @@ void Delete(int UnDel, int Area, char *File) } if (!UnDel && !fdb.Deleted) { fdb.Deleted = TRUE; - Syslog('+', "Marked file %s in area %d for undeletion", File, Area); + Syslog('+', "Marked file %s in area %d for deletion", File, Area); if (!do_quiet) - printf("Marked file %s in area %d for undeletion\n", File, Area); + printf("Marked file %s in area %d for deletion\n", File, Area); rc = TRUE; } if (rc) { diff --git a/mbfido/mbfile.c b/mbfido/mbfile.c index 8b7d3efb..9247acb2 100644 --- a/mbfido/mbfile.c +++ b/mbfido/mbfile.c @@ -130,7 +130,7 @@ int main(int argc, char **argv) if (argc > (i + 1)) { i++; Area = atoi(argv[i]); - cmd = xstrcat(cmd, argv[i]); + cmd = xstrcat(cmd, (char *)" "); cmd = xstrcat(cmd, argv[i]); if (argc > (i + 1)) { i++; diff --git a/mbfido/mbfimport.c b/mbfido/mbfimport.c index b2dfdc9b..a0520b5a 100644 --- a/mbfido/mbfimport.c +++ b/mbfido/mbfimport.c @@ -180,9 +180,9 @@ void ImportFiles(int Area) /* * Create DOS 8.3 filename */ - strcpy(temp, fdb.LName); - name_mangle(temp); - strcpy(fdb.Name, temp); + strcpy(temp2, fdb.LName); + name_mangle(temp2); + strcpy(fdb.Name, temp2); if (do_annon) fdb.Announced = TRUE; diff --git a/mbfido/mbfindex.c b/mbfido/mbfindex.c index a749367f..520d1434 100644 --- a/mbfido/mbfindex.c +++ b/mbfido/mbfindex.c @@ -548,6 +548,7 @@ void Index(void) } } fclose(fp); + chmod(temp, 0644); } /* @@ -609,6 +610,8 @@ void Index(void) if ((j = execute(CFG.www_convert, linebuf, outbuf, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null"))) { Syslog('+', "Failed to create thumbnail for %s, rc=% d", file.LName, j); + } else { + chmod(outbuf, 0644); } } fprintf(fa, "", @@ -650,6 +653,7 @@ void Index(void) } closepage(fa, area.Path, inArea, aTotal); fclose(fp); + chmod(temp, 0644); /* * If the time before there were more files in this area then now, diff --git a/mbfido/mbfutil.c b/mbfido/mbfutil.c index fcc5e743..6e60b72b 100644 --- a/mbfido/mbfutil.c +++ b/mbfido/mbfutil.c @@ -314,6 +314,7 @@ int AddFile(struct FILERecord fdb, int Area, char *DestPath, char *FromPath) WriteError("Can't move file in place"); return FALSE; } + chmod(DestPath, 0644); temp1 = calloc(PATH_MAX, sizeof(char)); temp2 = calloc(PATH_MAX, sizeof(char)); diff --git a/mbsetup/m_node.c b/mbsetup/m_node.c index ec49eef9..c64474bc 100644 --- a/mbsetup/m_node.c +++ b/mbsetup/m_node.c @@ -877,7 +877,7 @@ int EditNodeRec(int Area) case 25:E_BOOL(15,70, nodes.NoZmodem, "Disable ^Zmodem^ protocol with this node") case 26:E_BOOL(16,70, nodes.NoZedzap, "Disable ^Zedzap^ protocol with this node") case 27:E_BOOL(17,70, nodes.NoHydra, "Disable ^Hydra^ protocol with this node") - case 28:E_BOOL(18,70, nodes.NoTCP, "Disable ^TCP/IP^ protocol whith this node") + case 28:E_BOOL(18,70, nodes.NoTCP, "Disable ^TCP/IP^ protocol with this node") case 29:E_BOOL(19,70, nodes.FNC, "Node needs ^DOS 8.3^ filenames") } }