From 0ff5071414497aabe190b787d3ea686ee929cb41 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 2 Feb 2003 21:48:00 +0000 Subject: [PATCH] Added setup for the rules directory --- ChangeLog | 4 ++++ Makefile | 5 +++++ mbsetup/m_global.c | 9 ++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4e24cd70..746c11e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ $Id$ v0.37.01 14-Jan-2003. upgrade: + After installing the binaries, start mbsetup, enter menu 1 and + leave that and save it. This will set the default rules + directory, will be used later. After upgrade you may remove ~/etc/maptabs and it's contents. After upgrade you may remove ~/etc/bank.data. @@ -56,6 +59,7 @@ v0.37.01 14-Jan-2003. When moving a message area to area zero mbsetup doesn't crash anymore. Added new menu item 319, remove menu items 22 and 23. + Added setup for rules directory. mbsebbs: It will now refuse to up/download OLR packets when the system diff --git a/Makefile b/Makefile index 45b2a031..0fad26e6 100644 --- a/Makefile +++ b/Makefile @@ -148,6 +148,11 @@ install: ${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/var/boxes ; \ chmod 0750 ${PREFIX}/var/boxes ; \ fi + @if [ ! -d ${PREFIX}/var/rules ]; then \ + mkdir ${PREFIX}/var/rules ; \ + ${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/var/rules ; \ + chmod 0750 ${PREFIX}/var/rules ; \ + fi @if [ ! -d ${PREFIX}/var/unknown ] ; then \ mkdir ${PREFIX}/var/unknown ; \ mkdir ${PREFIX}/var/inbound ; \ diff --git a/mbsetup/m_global.c b/mbsetup/m_global.c index 09bd8f7b..f4bfa031 100644 --- a/mbsetup/m_global.c +++ b/mbsetup/m_global.c @@ -236,6 +236,7 @@ void e_global2(void) mvprintw(10, 2, "5. Ftp base"); mvprintw(11, 2, "6. Arealists"); mvprintw(12, 2, "7. Ext. edit"); + mvprintw(13, 2, "8. Rules dir"); for (;;) { set_color(WHITE, BLACK); @@ -246,8 +247,9 @@ void e_global2(void) show_str(10,16,64, CFG.ftp_base); show_str(11,16,64, CFG.alists_path); show_str(12,16,64, CFG.externaleditor); + show_str(13,16,64, CFG.rulesdir); - switch(select_menu(7)) { + switch(select_menu(8)) { case 0: return; case 1: E_PTH( 6,16,64, CFG.req_magic, "The path to the ^magic filerequest^ files.", 0750) case 2: E_STR( 7,16,64, CFG.dospath, "The translated ^DOS^ drive and path, empty disables translation") @@ -257,6 +259,7 @@ void e_global2(void) case 6: E_PTH(11,16,64, CFG.alists_path, "The path where ^area lists^ and ^filebone lists^ are stored.", 0750) case 7: E_STR(12,16,64, CFG.externaleditor, "The full path and filename to the ^external message editor^ (blank=disable)") + case 8: E_PTH(13,16,64, CFG.rulesdir, "The path where the ^arearules^ are stored", 0750) } }; } @@ -1606,6 +1609,10 @@ void global_menu(void) Syslog('+', "Main config, upgraded for AreaMgr flags"); } + if (strlen(CFG.rulesdir) == 0) { + sprintf(CFG.rulesdir, "%s/var/rules", getenv("MBSE_ROOT")); + Syslog('+', "Main config, upgraded rules directory"); + } for (;;) {