From a479fa7b7732c2d9e12699bd5f87ba185e9adee7 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Wed, 17 Mar 2004 20:24:59 +0000 Subject: [PATCH] Several setup settings added --- ChangeLog | 7 +- TODO | 2 +- html/images/filefind.png | Bin 5261 -> 10759 bytes html/setup/filefind.html | 3 +- html/setup/global.html | 16 +++- lib/execute.c | 44 +++++------ lib/mbselib.h | 5 ++ mbfido/filefind.c | 2 +- mbsetup/m_ff.c | 165 +++++++++++++++++++++------------------ mbsetup/m_global.c | 77 +++++++++++------- mbtask/mbtask.c | 6 ++ 11 files changed, 192 insertions(+), 135 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c4658ac..52124e8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,7 +10,7 @@ v0.51.2 06-Mar-2004 Install programs as root (as usual). Start mbsetup, this can take a while on a system with lots of files, during startup the files database will be converted. - After the menu appears, you may exit mbsetup. + After the menu appears, enter global setup, exit and save. Open the system again. If you want you may restart mbtask. @@ -20,6 +20,8 @@ v0.51.2 06-Mar-2004 features. Removed all references to costsharing for ticfiles which wasn't fully implemented. + Added setup items for subprocess priority and sync filesystem. + Added setup parameter for filefind keyword length. libcommon.a: Moved the initial delay in the execute functions to the child @@ -81,6 +83,9 @@ v0.51.2 06-Mar-2004 Changed menus 14, 7.n.6, 10.1 and 8.4. Changed default charset for new mailgroups and message areas to CP437. + Added setup for filefind keyword length in menu 13. + Added setup items in menu 1.5 for child priority and filesystem + sync calls. mbuseradd: Fixed removing of a OS created homedir. This may solve problems diff --git a/TODO b/TODO index a09c67ba..f126867b 100644 --- a/TODO +++ b/TODO @@ -152,7 +152,7 @@ mbmsg: areas. mbaff: - L: Add setup parameters for minimum length of keywords. + L: Rewrite filefind search algorithm. mbindex: X: Add usernames index. diff --git a/html/images/filefind.png b/html/images/filefind.png index 8348fdba3103cd54efd6eada16906eec7675f56d..c736dc215d87ec5dcea8ee8b4b9f2c841f7f2340 100644 GIT binary patch literal 10759 zcm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nd`ef9G3zpw$*>tUtFqB(Dv%I0UA~PeP2*yh9jB6n#H1 zC~wXG)MKWHiyhV0C?3e7U+a_8+bq5fTfb&5p+n)MS=X(l+q~)3wL*FWe=3Y_qfK^u zi_!5i*skqh$TX@H#8}QrsFE^}@5(w-klXk7EK|8wW$|iN8Py#wPlEwUa_%knfq%9% z3Rj&54fth0l_~uh@y`}c?+rte^>~O&7TBm^F+c2B#*%DcTFWa5cKGzW z{S==gwzQi=`3nxe4<@T7$gi*r{N260tz2SH6zUe+*Y9`!a_ip*pUWtYT^{^*>w#;o zYuQ5-*{k_#d)8GRU2G?5NT?|EruZFBdgx#o_e$DI%RRbWocs}fp_j9roBgC+qG7Sn zh-a@*^k|^KBjNZ`2}o{h>#R*$+aM&sWeuo#hx-NBqj6JzZ+Tf`fC7o$&-2KswT)Vb zh^n(7)1vQ8v|Y#CbFl_49#xQgqS$P7Vo2vqg=6n%K@T^Gxp%&s*Tg=T!mU~ZmC<`Y zQKX%JV&3d*{Md&b?XF+ze1*dAyW&aPq46iYZGWYt;rT$k;&FgJ2>LRhCkz*?8Fq8# zS{UoQLynzfdM0Qjg;{w0Q`1~}cXnIB@iGQ1W{;zE7^l+W(oV+cS9?3qA%!z2rv3?PmmI(1*i7l5KSDxPTyH8(z zH0&}dY#uBReE|z}W`x4%pt14DoUd?Tn0Ivt$X43toCOSeZyNVHYwsCd?lmq7r!&q%tp4nXlAj`&chL=Z*dK^L~vu9#Bo5 z+O-eGCNs0XoVB9@N@ESxHHK;>*q7 zpAxoG*Q)~7+v_j`=3_YjDIaYonHa8)60RGLBbomR!2b!_KNq4%;lN{%<3GkhJs^1R ikGGk5K*znDQyLHJv}C%;Y_7jQ47DFY)k_}Qg#H%
-
Last update 30-Jan-2001
+
Last update 17-Mar-2004

MBSE BBS Setup - Filefind Areas.

Introduction.

@@ -44,6 +44,7 @@ for. Deleted If this area must be deleted. Net. reply If the reply will be sent by netmail. Hi ACSII If high ASCII is allowed in the replies. +Keywrd len The minimum keyword length allowed in search.

Filefind setup diff --git a/html/setup/global.html b/html/setup/global.html index 1245f96f..6faea0ff 100644 --- a/html/setup/global.html +++ b/html/setup/global.html @@ -14,7 +14,7 @@

-
Last update 14-Jan-2004
+
Last update 17-Mar-2004

MBSE BBS Setup - Global Setup

In this setup you can edit all global settings for MBSE BBS. All sections will @@ -125,12 +125,26 @@ files. FileAttach level Minimum level to allow attach files to netmail Min diskspace MB At which low diskspace level utilities should stop working. Simult. logins Maximum simultaneous logins allowed, 0 is unlimited, 1 is adviced. +Child priority Subproces nice priority, 0=high, 15=low CPU load. +Filesystem sync Call sync before and after execute. The minimum diskspace setting is to prevent that files get corrupted if your filesystem is full. All drives are checked except CD-roms and floppies and the /boot directory if that one is on a separate filesystem. Ext2, ext3, reiserfs, msdos and vfat partitions are checked. The lowest free diskspace found counts. Default is 10 MB.

+The Child priority sets the nice value for example zip/unzip, virus scanners +etc. Modern fast hardware will do fine with a low setting, older (pre PII) +hardware may need 15 to prevent a too heavy CPU load. +

+The filesystem sync setting is to call sync before and after the execute call, +such as when unzip is called. Almost all GNU/Linux systems need this because GNU/Linux +uses asynchronous directory changes. Since Linux 2.5.19 it should be possible to +mount filesystems synchronous. If this setting is No on asynchronous filesystems +mail and files can get corrupted. XxxxBSD systems use synchronous directory +updates and don't need this switch. If you don't know what all this is about, +leave this to the default setting. +

1.6. User flag Descriptions.

diff --git a/lib/execute.c b/lib/execute.c index 0ae3f00e..82cdf276 100644 --- a/lib/execute.c +++ b/lib/execute.c @@ -36,8 +36,8 @@ int e_pid = 0; /* Execute child pid */ -int _execute(char **, char *, char *, char *, int); -int _execute(char **args, char *in, char *out, char *err, int priority) +int _execute(char **, char *, char *, char *); +int _execute(char **args, char *in, char *out, char *err) { char buf[PATH_MAX]; int i, pid, terrno = 0, status = 0, rc = 0; @@ -84,12 +84,15 @@ int _execute(char **args, char *in, char *out, char *err, int priority) } errno = 0; - if (priority) { + if (CFG.priority) { rc = getpriority(PRIO_PROCESS, 0); + Syslog('e', "getpriority in child %d", rc); if (errno == 0) { - rc = setpriority(PRIO_PROCESS, 0, priority); + rc = setpriority(PRIO_PROCESS, 0, CFG.priority); if (rc) - WriteError("$execv can't set priority to %d", priority); + WriteError("$execv can't set priority to %d", CFG.priority); + rc = getpriority(PRIO_PROCESS, 0); + Syslog('e', "getpriority in set to %d", rc); } } rc = execv(args[0],args); @@ -105,8 +108,11 @@ int _execute(char **args, char *in, char *out, char *err, int priority) } while (((rc > 0) && (rc != pid)) || ((rc == -1) && (errno == EINTR))); terrno = errno; - if (priority) + if (CFG.priority) { + rc = getpriority(PRIO_PROCESS, 0); + Syslog('e', "getpriority in parent %d", rc); setpriority(PRIO_PROCESS, 0, 0); + } errno = terrno; switch (rc) { @@ -149,14 +155,11 @@ int execute(char **args, char *in, char *out, char *err) { int rc; -#ifdef __linux__ - sync(); -#endif - rc = _execute(args, in, out, err, 15); -#ifdef __linux__ - sync(); -#endif -// msleep(300); + if (CFG.do_sync) + sync(); + rc = _execute(args, in, out, err); + if (CFG.do_sync) + sync(); return rc; } @@ -248,7 +251,7 @@ int _execsh(char *cmd, char *in, char *out, char *err) * A delay in the child to prevent it returns before the main * process sess it ever started. */ - msleep(300); + msleep(150); if (in) { close(0); @@ -301,14 +304,11 @@ int execsh(char *cmd, char *in, char *out, char *err) { int rc; -#ifdef __linux__ - sync(); -#endif + if (CFG.do_sync) + sync(); rc = _execsh(cmd, in, out, err); -#ifdef __linux__ - sync(); -#endif -// msleep(300); + if (CFG.do_sync) + sync(); return rc; } diff --git a/lib/mbselib.h b/lib/mbselib.h index 7ee1d8a5..2b933504 100644 --- a/lib/mbselib.h +++ b/lib/mbselib.h @@ -1176,6 +1176,10 @@ struct sysconfig { char debuglog[15]; /* Debug logfile */ char tmailshort[65]; /* T-Mail short filebox base*/ char tmaillong[65]; /* T-Mail long filebox base */ + + int priority; /* Child process priority */ + unsigned do_sync : 1; /* Sync() during execute */ + unsigned is_upgraded : 1; /* For internal upgrade use */ }; @@ -1876,6 +1880,7 @@ struct _scanmgr { unsigned NetReply : 1; /* Netmail reply */ unsigned Deleted : 1; /* Area is deleted */ unsigned HiAscii : 1; /* High Ascii allowed */ + int keywordlen; /* Minimum keyword length */ }; diff --git a/mbfido/filefind.c b/mbfido/filefind.c index 5b7cb859..98351840 100644 --- a/mbfido/filefind.c +++ b/mbfido/filefind.c @@ -332,7 +332,7 @@ void ScanFiles(ff_list *tmp) } tl(kwd); - if (strlen(kwd) > 3) { + if (strlen(kwd) > scanmgr.keywordlen) { if (strstr(fdb.Name, kwd) != NULL) { Found = TRUE; Syslog('m', "Found %s in %s in filename", kwd, fdb.Name); diff --git a/mbsetup/m_ff.c b/mbsetup/m_ff.c index 7577a172..1b7871a7 100644 --- a/mbsetup/m_ff.c +++ b/mbsetup/m_ff.c @@ -120,6 +120,10 @@ int OpenFilefind(void) sprintf(scanmgr.template, "filefind"); FilefindUpdated = 1; } + if (!scanmgr.keywordlen) { + scanmgr.keywordlen = 3; + FilefindUpdated = 1; + } fwrite(&scanmgr, sizeof(scanmgr), 1, fout); memset(&scanmgr, 0, sizeof(scanmgr)); } @@ -195,6 +199,7 @@ int AppendFilefind(void) scanmgr.Language = 'E'; sprintf(scanmgr.template, "filefind"); strncpy(scanmgr.Origin, CFG.origin, 50); + scanmgr.keywordlen = 3; fwrite(&scanmgr, sizeof(scanmgr), 1, fil); fclose(fil); FilefindUpdated = 1; @@ -222,6 +227,7 @@ void FFScreen(void) mvprintw(15, 2, "9. Deleted"); mvprintw(16, 2, "10. Net. reply"); mvprintw(17, 2, "11. Hi Ascii"); + mvprintw(18, 2, "12. Keywrd len"); } @@ -231,90 +237,90 @@ void FFScreen(void) */ int EditFfRec(int Area) { - FILE *fil; - char mfile[PATH_MAX], temp1[2]; - long offset; - unsigned long crc, crc1; - int i; + FILE *fil; + char mfile[PATH_MAX], temp1[2]; + long offset; + unsigned long crc, crc1; + int i; - clr_index(); - working(1, 0, 0); - IsDoing("Edit Filefind"); + clr_index(); + working(1, 0, 0); + IsDoing("Edit Filefind"); - sprintf(mfile, "%s/etc/scanmgr.temp", getenv("MBSE_ROOT")); - if ((fil = fopen(mfile, "r")) == NULL) { - working(2, 0, 0); - return -1; - } + sprintf(mfile, "%s/etc/scanmgr.temp", getenv("MBSE_ROOT")); + if ((fil = fopen(mfile, "r")) == NULL) { + working(2, 0, 0); + return -1; + } - fread(&scanmgrhdr, sizeof(scanmgrhdr), 1, fil); - offset = scanmgrhdr.hdrsize + ((Area -1) * scanmgrhdr.recsize); - if (fseek(fil, offset, 0) != 0) { - working(2, 0, 0); - return -1; - } + fread(&scanmgrhdr, sizeof(scanmgrhdr), 1, fil); + offset = scanmgrhdr.hdrsize + ((Area -1) * scanmgrhdr.recsize); + if (fseek(fil, offset, 0) != 0) { + working(2, 0, 0); + return -1; + } - fread(&scanmgr, scanmgrhdr.recsize, 1, fil); - fclose(fil); - crc = 0xffffffff; - crc = upd_crc32((char *)&scanmgr, crc, scanmgrhdr.recsize); + fread(&scanmgr, scanmgrhdr.recsize, 1, fil); + fclose(fil); + crc = 0xffffffff; + crc = upd_crc32((char *)&scanmgr, crc, scanmgrhdr.recsize); - for (;;) { - FFScreen(); - set_color(WHITE, BLACK); - show_str( 7,18,55, scanmgr.Comment); - show_str( 8,18,50, scanmgr.Origin); - show_str( 9,18,35, aka2str(scanmgr.Aka)); - show_str( 10,18,50, scanmgr.ScanBoard); - show_str( 11,18,50, scanmgr.ReplBoard); - sprintf(temp1, "%c", scanmgr.Language); - show_str( 12,18,2, temp1); - show_str( 13,18,14, scanmgr.template); - show_bool(14,18, scanmgr.Active); - show_bool(15,18, scanmgr.Deleted); - show_bool(16,18, scanmgr.NetReply); - show_bool(17,18, scanmgr.HiAscii); - - switch(select_menu(11)) { - case 0: - crc1 = 0xffffffff; - crc1 = upd_crc32((char *)&scanmgr, crc1, scanmgrhdr.recsize); - if (crc != crc1) { - if (yes_no((char *)"Record is changed, save") == 1) { - working(1, 0, 0); - if ((fil = fopen(mfile, "r+")) == NULL) { - working(2, 0, 0); - return -1; - } - fseek(fil, offset, 0); - fwrite(&scanmgr, scanmgrhdr.recsize, 1, fil); - fclose(fil); - FilefindUpdated = 1; - working(6, 0, 0); - } + for (;;) { + FFScreen(); + set_color(WHITE, BLACK); + show_str( 7,18,55, scanmgr.Comment); + show_str( 8,18,50, scanmgr.Origin); + show_str( 9,18,35, aka2str(scanmgr.Aka)); + show_str( 10,18,50, scanmgr.ScanBoard); + show_str( 11,18,50, scanmgr.ReplBoard); + sprintf(temp1, "%c", scanmgr.Language); + show_str( 12,18,2, temp1); + show_str( 13,18,14, scanmgr.template); + show_bool(14,18, scanmgr.Active); + show_bool(15,18, scanmgr.Deleted); + show_bool(16,18, scanmgr.NetReply); + show_bool(17,18, scanmgr.HiAscii); + show_int( 18,18, scanmgr.keywordlen); + + switch(select_menu(12)) { + case 0: crc1 = 0xffffffff; + crc1 = upd_crc32((char *)&scanmgr, crc1, scanmgrhdr.recsize); + if (crc != crc1) { + if (yes_no((char *)"Record is changed, save") == 1) { + working(1, 0, 0); + if ((fil = fopen(mfile, "r+")) == NULL) { + working(2, 0, 0); + return -1; + } + fseek(fil, offset, 0); + fwrite(&scanmgr, scanmgrhdr.recsize, 1, fil); + fclose(fil); + FilefindUpdated = 1; + working(6, 0, 0); } - IsDoing("Browsing Menu"); - return 0; - - case 1: E_STR( 7,18,55, scanmgr.Comment, "The ^comment^ for this area") - case 2: E_STR( 8,18,50, scanmgr.Origin, "The ^origin^ line to append, leave blank for random lines") - case 3: i = PickAka((char *)"13.3", TRUE); - if (i != -1) - scanmgr.Aka = CFG.aka[i]; - break; - case 4: strcpy(scanmgr.ScanBoard, PickMsgarea((char *)"13.4")); - break; - case 5: strcpy(scanmgr.ReplBoard, PickMsgarea((char *)"13.5")); - break; - case 6: scanmgr.Language = PickLanguage((char *)"13.6"); - break; - case 7: E_STR( 13,18,14, scanmgr.template, "The ^template^ file to use for the report") - case 8: E_BOOL(14,18, scanmgr.Active, "If this report is ^active^") - case 9: E_BOOL(15,18, scanmgr.Deleted, "If this record is ^deleted^") - case 10:E_BOOL(16,18, scanmgr.NetReply, "If reply's via ^netmail^ instead of echomail") - case 11:E_BOOL(17,18, scanmgr.HiAscii, "Allow ^Hi ASCII^ in this area") - } + } + IsDoing("Browsing Menu"); + return 0; + case 1: E_STR( 7,18,55, scanmgr.Comment, "The ^comment^ for this area") + case 2: E_STR( 8,18,50, scanmgr.Origin, "The ^origin^ line to append, leave blank for random lines") + case 3: i = PickAka((char *)"13.3", TRUE); + if (i != -1) + scanmgr.Aka = CFG.aka[i]; + break; + case 4: strcpy(scanmgr.ScanBoard, PickMsgarea((char *)"13.4")); + break; + case 5: strcpy(scanmgr.ReplBoard, PickMsgarea((char *)"13.5")); + break; + case 6: scanmgr.Language = PickLanguage((char *)"13.6"); + break; + case 7: E_STR( 13,18,14, scanmgr.template, "The ^template^ file to use for the report") + case 8: E_BOOL(14,18, scanmgr.Active, "If this report is ^active^") + case 9: E_BOOL(15,18, scanmgr.Deleted, "If this record is ^deleted^") + case 10:E_BOOL(16,18, scanmgr.NetReply, "If reply's via ^netmail^ instead of echomail") + case 11:E_BOOL(17,18, scanmgr.HiAscii, "Allow ^Hi ASCII^ in this area") + case 12:E_IRC( 18,18, scanmgr.keywordlen, 3, 8, "Minimum ^keyword length^ to allowed for search") } + } } @@ -443,7 +449,7 @@ int ff_doc(FILE *fp, FILE *toc, int page) while ((fread(&scanmgr, scanmgrhdr.recsize, 1, no)) == 1) { - if (j == 5) { + if (j == 4) { page = newpage(fp, page); fprintf(fp, "\n"); j = 0; @@ -455,8 +461,11 @@ int ff_doc(FILE *fp, FILE *toc, int page) fprintf(fp, " Scan msg board %s\n", scanmgr.ScanBoard); fprintf(fp, " Reply msg board %s\n", scanmgr.ReplBoard); fprintf(fp, " Language %c\n", scanmgr.Language); + fprintf(fp, " Template file %s\n", scanmgr.template); fprintf(fp, " Active %s\n", getboolean(scanmgr.Active)); fprintf(fp, " Netmail reply %s\n", getboolean(scanmgr.NetReply)); + fprintf(fp, " Allow Hi-ASCII %s\n", getboolean(scanmgr.HiAscii)); + fprintf(fp, " Keyword length %d\n", scanmgr.keywordlen); fprintf(fp, "\n\n"); j++; } diff --git a/mbsetup/m_global.c b/mbsetup/m_global.c index 14c14ab1..a90c2ccb 100644 --- a/mbsetup/m_global.c +++ b/mbsetup/m_global.c @@ -350,17 +350,19 @@ void b_screen(void) mvprintw(15, 2, "9. Homedir Quota"); mvprintw(16, 2, "10. Location length"); mvprintw(17, 2, "11. Show new msgarea"); - - mvprintw( 7,37, "12. OLR Max. msgs."); - mvprintw( 8,37, "13. OLR Newfile days"); - mvprintw( 9,37, "14. OLR Max Filereq"); - mvprintw(10,37, "15. BBS Log Level"); - mvprintw(11,37, "16. Utils loglevel"); - mvprintw(12,37, "17. Utils slowly"); - mvprintw(13,37, "18. CrashMail level"); - mvprintw(14,37, "19. FileAttach level"); - mvprintw(15,37, "20. Min diskspace MB"); - mvprintw(16,37, "21. Simult. logins"); + mvprintw(18, 2, "12. OLR Max. msgs."); + + mvprintw( 7,37, "13. OLR Newfile days"); + mvprintw( 8,37, "14. OLR Max Filereq"); + mvprintw( 9,37, "15. BBS Log Level"); + mvprintw(10,37, "16. Utils loglevel"); + mvprintw(11,37, "17. Utils slowly"); + mvprintw(12,37, "18. CrashMail level"); + mvprintw(13,37, "19. FileAttach level"); + mvprintw(14,37, "20. Min diskspace MB"); + mvprintw(15,37, "21. Simult. logins"); + mvprintw(16,37, "22. Child priority"); + mvprintw(17,37, "23. Filesystem sync"); set_color(WHITE, BLACK); show_bool( 7,24, CFG.exclude_sysop); @@ -374,17 +376,19 @@ void b_screen(void) show_int( 15,24, CFG.iQuota); show_int( 16,24, CFG.CityLen); show_bool(17,24, CFG.NewAreas); + show_int( 18,24, CFG.OLR_MaxMsgs); - show_int( 7,59, CFG.OLR_MaxMsgs); - show_int( 8,59, CFG.OLR_NewFileLimit); - show_int( 9,59, CFG.OLR_MaxReq); - show_logl(10,59, CFG.bbs_loglevel); - show_logl(11,59, CFG.util_loglevel); - show_bool(12,59, CFG.slow_util); - show_int( 13,59, CFG.iCrashLevel); - show_int( 14,59, CFG.iAttachLevel); - show_int( 15,59, CFG.freespace); - show_int( 16,59, CFG.max_logins); + show_int( 7,59, CFG.OLR_NewFileLimit); + show_int( 8,59, CFG.OLR_MaxReq); + show_logl( 9,59, CFG.bbs_loglevel); + show_logl(10,59, CFG.util_loglevel); + show_bool(11,59, CFG.slow_util); + show_int( 12,59, CFG.iCrashLevel); + show_int( 13,59, CFG.iAttachLevel); + show_int( 14,59, CFG.freespace); + show_int( 15,59, CFG.max_logins); + show_int( 16,59, CFG.priority); + show_bool(17,59, CFG.do_sync); } @@ -394,7 +398,7 @@ void e_bbsglob(void) b_screen(); for (;;) { - switch(select_menu(21)) { + switch(select_menu(23)) { case 0: return; case 1: E_BOOL( 7,24, CFG.exclude_sysop, "^Exclude^ sysop from lists.") case 2: E_BOOL( 8,24, CFG.iConnectString, "Show ^connect string^ at logon") @@ -407,17 +411,19 @@ void e_bbsglob(void) case 9: E_INT( 15,24, CFG.iQuota, "Maximum ^Quota^ in MBytes in users homedirectory"); case 10:E_IRC( 16,24, CFG.CityLen, 3, 6, "Minimum ^Location name^ length (3..6)") case 11:E_BOOL(17,24, CFG.NewAreas, "Show ^new^ or ^deleted^ message areas to the user at login.") + case 12:E_INT( 18,24, CFG.OLR_MaxMsgs, "^Maximum messages^ to pack for download (0=unlimited)") - case 12:E_INT( 7,59, CFG.OLR_MaxMsgs, "^Maximum messages^ to pack for download (0=unlimited)") - case 13:E_INT( 8,59, CFG.OLR_NewFileLimit, "^Limit Newfiles^ listing for maximum days") - case 14:E_INT( 9,59, CFG.OLR_MaxReq, "Maximum ^Filerequests^ to honor") + case 13:E_INT( 7,59, CFG.OLR_NewFileLimit, "^Limit Newfiles^ listing for maximum days") + case 14:E_INT( 8,59, CFG.OLR_MaxReq, "Maximum ^Filerequests^ to honor") case 15:E_LOGL(CFG.bbs_loglevel, "1.5.15", b_screen) case 16:E_LOGL(CFG.util_loglevel, "1.5.16", b_screen) - case 17:E_BOOL(12,59, CFG.slow_util, "Let background utilities run ^slowly^") - case 18:E_INT( 13,59, CFG.iCrashLevel, "The user level to allow sending ^CrashMail^") - case 19:E_INT( 14,59, CFG.iAttachLevel, "The user level to allow sending ^File Attaches^") - case 20:E_IRC( 15,59, CFG.freespace, 2, 1000, "Minimum ^free diskspace^ in MBytes on filesystems (2..1000)") - case 21:E_INT( 16,59, CFG.max_logins, "Maximum ^simultaneous logins^ allowed, 0 means unlimited") + case 17:E_BOOL(11,59, CFG.slow_util, "Let background utilities run ^slowly^") + case 18:E_INT( 12,59, CFG.iCrashLevel, "The user level to allow sending ^CrashMail^") + case 19:E_INT( 13,59, CFG.iAttachLevel, "The user level to allow sending ^File Attaches^") + case 20:E_IRC( 14,59, CFG.freespace, 2, 1000, "Minimum ^free diskspace^ in MBytes on filesystems (2..1000)") + case 21:E_INT( 15,59, CFG.max_logins, "Maximum ^simultaneous logins^ allowed, 0 means unlimited") + case 22:E_IRC( 16,59, CFG.priority, 0, 15, "Subproces ^nice priority^, 0=high, 15=low CPU load") + case 23:E_BOOL(17,59, CFG.do_sync, "Call ^sync^ before and after execute, use Yes on GNU/Linux") } } } @@ -1430,6 +1436,15 @@ void global_menu(void) Syslog('+', "Main config, upgraded rules directory"); } + if (!CFG.is_upgraded) { + CFG.priority = 15; +#ifdef __linux__ + CFG.do_sync = TRUE; +#endif + CFG.is_upgraded = TRUE; + Syslog('+', "Main config, upgraded execute settings"); + } + for (;;) { clr_index(); @@ -1692,6 +1707,8 @@ int global_doc(FILE *fp, FILE *toc, int page) fprintf(fp, " Simult. logins %d\n", CFG.max_logins); else fprintf(fp, " Simult. logins unlimited\n"); + fprintf(fp, " Child priority %d\n", CFG.priority); + fprintf(fp, " Sync on execute %s\n", getboolean(CFG.do_sync)); page = newpage(fp, page); addtoc(fp, toc, 1, 7, page, (char *)"Users flag descriptions"); diff --git a/mbtask/mbtask.c b/mbtask/mbtask.c index fa3a4979..44c7f934 100644 --- a/mbtask/mbtask.c +++ b/mbtask/mbtask.c @@ -355,6 +355,12 @@ void load_maincfg(void) CFG.maxarticles = 500; + CFG.priority = 15; +#ifdef __linux__ + CFG.do_sync = TRUE; +#endif + CFG.is_upgraded = TRUE; + if ((fp = fopen(cfgfn, "a+")) == NULL) { perror(""); fprintf(stderr, "Can't create %s\n", cfgfn);