Moved magic directory into ~/var

This commit is contained in:
Michiel Broek 2004-09-14 20:11:20 +00:00
parent e67668499a
commit d9c5d0eb54
6 changed files with 34 additions and 11 deletions

View File

@ -9,13 +9,15 @@ v0.61.4 11-Aug-2004
(That was twice). (That was twice).
Don't forget to backup /opt/mbse. Don't forget to backup /opt/mbse.
Before upgrade (make install) stop the bbs with "mbstat c w". Before upgrade (make install) stop the bbs with "mbstat c w".
Kill mbtask, "kill `/sbin/pidof mbtask` might work.
This is important because the files database moves to a new This is important because the files database moves to a new
location (~/var/fdb). location (~/var/fdb). Some other directories move too.
Now you can run "make install" and start the bbs again.
Start "mbsetup", enter 1, global setup, leave and save".
If you have BBBS uplinks and use automatic uplink requests then If you have BBBS uplinks and use automatic uplink requests then
change the setup of these nodes in screen 7.10. change the setup of these nodes in screen 7.10.
Run "mbfile check" and then "mbfile index". This fixes the Run "mbfile check" and then "mbfile index". This fixes the
thumbnails if supported by your system. thumbnails if supported by your system.
Start mbsetup, enter global setup and leave.
libmbse.a: libmbse.a:
The socket_connect function now sets the global nodenumber from The socket_connect function now sets the global nodenumber from
@ -60,8 +62,8 @@ v0.61.4 11-Aug-2004
Changed to use the new files database location. Changed to use the new files database location.
mbindex: mbindex:
Fixed compiling pointlists where on the Boss line there is no Fixed compiling pointlists where on the Boss line when there
last comma on the line. is no last comma on the line.
mbmsg: mbmsg:
Fixed counter in log that should show the number of linked Fixed counter in log that should show the number of linked
@ -96,6 +98,8 @@ v0.61.4 11-Aug-2004
was on hold. was on hold.
The comm protocol reply to the AINI command now contains a fake The comm protocol reply to the AINI command now contains a fake
node number. node number.
The magic filenames directory is move from ~/magic to
~/var/magic.
mbsetup: mbsetup:
Changed nodes screens to have a separate uplink managers setup Changed nodes screens to have a separate uplink managers setup
@ -103,6 +107,8 @@ v0.61.4 11-Aug-2004
If the convert program is found and was not found before, the If the convert program is found and was not found before, the
defaults are set in menu 1.15.6. defaults are set in menu 1.15.6.
The files database is moved from ~/fdb to ~/var/fdb. The files database is moved from ~/fdb to ~/var/fdb.
The magic filenames directory is move from ~/magic to
~/var/magic.
script: script:
In the editor script (that calls joe) made a fix for screens In the editor script (that calls joe) made a fix for screens

View File

@ -53,7 +53,6 @@ install:
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/doc/html @${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/doc/html
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/doc/tags @${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/share/doc/tags
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/log @${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/log
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/magic
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0777 ${PREFIX}/sema @${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0777 ${PREFIX}/sema
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/tmp @${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/tmp
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/home @${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/home
@ -102,6 +101,13 @@ install:
mv ${PREFIX}/fdb/file*.data ${PREFIX}/var/fdb ; \ mv ${PREFIX}/fdb/file*.data ${PREFIX}/var/fdb ; \
echo "...done. You may remove ${PREFIX}/fdb" ; \ echo "...done. You may remove ${PREFIX}/fdb" ; \
fi fi
@if [ ! -d ${PREFIX}/var/magic ] && [ -d ${PREFIX}/magic ]; then \
echo "Migrate magic filenames..." ; \
${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/magic ; \
mv ${PREFIX}/magic/* ${PREFIX}/var/magic ; \
rmdir ${PREFIX}/magic ; \
echo "...done." ; \
fi
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/var/fdb @${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/var/fdb
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/hatch @${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/hatch
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/inbound @${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/var/inbound

View File

@ -14,7 +14,7 @@
</HEAD> </HEAD>
<BODY> <BODY>
<BLOCKQUOTE> <BLOCKQUOTE>
<div align="right"><h5>Last update 11-Aug-2004</h5></div> <div align="right"><h5>Last update 14-Sep-2004</h5></div>
<div align="center"><h1>MBSE BBS Basic Installation</h1></div> <div align="center"><h1>MBSE BBS Basic Installation</h1></div>
<h3>Introduction.</h3> <h3>Introduction.</h3>
@ -51,7 +51,6 @@ layout looks like this:<br>
/opt/mbse/english/txtfiles 0770 Default english ANSI files /opt/mbse/english/txtfiles 0770 Default english ANSI files
/opt/mbse/etc 0770 System configuration files /opt/mbse/etc 0770 System configuration files
/opt/mbse/etc/dosemu 0750 DOSemu configuration files /opt/mbse/etc/dosemu 0750 DOSemu configuration files
/opt/mbse/fdb 0770 Files database
/opt/mbse/ftp/pub 0755 Default FTP root for download areas. /opt/mbse/ftp/pub 0755 Default FTP root for download areas.
/opt/mbse/galego/macro 0750 Galego macro files /opt/mbse/galego/macro 0750 Galego macro files
/opt/mbse/galego/menus 0750 Galego menu files /opt/mbse/galego/menus 0750 Galego menu files
@ -63,7 +62,6 @@ layout looks like this:<br>
/opt/mbse/italian/menus 0750 Italian menu files /opt/mbse/italian/menus 0750 Italian menu files
/opt/mbse/italian/txtfiles 0770 Italian ANSI files /opt/mbse/italian/txtfiles 0770 Italian ANSI files
/opt/mbse/log 0770 MBSE BBS logfiles /opt/mbse/log 0770 MBSE BBS logfiles
/opt/mbse/magic 0750 Magic filerequest names
/opt/mbse/sema 0777 Semafore files /opt/mbse/sema 0777 Semafore files
/opt/mbse/share/doc 0750 Generated sitedocs /opt/mbse/share/doc 0750 Generated sitedocs
/opt/mbse/share/doc/html 0750 Generated html sitedocs /opt/mbse/share/doc/html 0750 Generated html sitedocs
@ -81,7 +79,9 @@ layout looks like this:<br>
/opt/mbse/var/bso/outbound 0770 Default outbound for main aka /opt/mbse/var/bso/outbound 0770 Default outbound for main aka
/opt/mbse/var/dosemu 0770 Base for DOS drives /opt/mbse/var/dosemu 0770 Base for DOS drives
/opt/mbse/var/dosemu/c 0770 DOS drive C: /opt/mbse/var/dosemu/c 0770 DOS drive C:
/opt/mbse/var/fdb 0770 Files database
/opt/mbse/var/inbound 0750 Protected inbound directory /opt/mbse/var/inbound 0750 Protected inbound directory
/opt/mbse/var/magic 0750 Magic filerequest names
/opt/mbse/var/mail 0770 JAM messagebase root /opt/mbse/var/mail 0770 JAM messagebase root
/opt/mbse/var/msgs 0770 *.msgs netmail directory (not yet in use). /opt/mbse/var/msgs 0770 *.msgs netmail directory (not yet in use).
/opt/mbse/var/nodelist 0750 Nodelists /opt/mbse/var/nodelist 0750 Nodelists

View File

@ -418,11 +418,11 @@ void InitFDB(void)
/* /*
* Search the magic directory to see if this file is a magic file. * Search the magic directory to see if this file is a magic file.
*/ */
sprintf(temp, "%s/magic", getenv("MBSE_ROOT")); sprintf(temp, "%s", CFG.req_magic);
if ((dp = opendir(temp)) != NULL) { if ((dp = opendir(temp)) != NULL) {
while ((de = readdir(dp))) { while ((de = readdir(dp))) {
if (de->d_name[0] != '.') { if (de->d_name[0] != '.') {
sprintf(temp, "%s/magic/%s", getenv("MBSE_ROOT"), de->d_name); sprintf(temp, "%s/%s", CFG.req_magic, de->d_name);
/* /*
* Only regular files without execute permission are magic requests. * Only regular files without execute permission are magic requests.
*/ */
@ -439,6 +439,8 @@ void InitFDB(void)
} }
} }
closedir(dp); closedir(dp);
} else {
WriteError("$Can't open directory %s", temp);
} }
fdb.Deleted = old.Deleted; fdb.Deleted = old.Deleted;
fdb.NoKill = old.NoKill; fdb.NoKill = old.NoKill;

View File

@ -1408,6 +1408,7 @@ void global_menu(void)
{ {
unsigned long crc, crc1; unsigned long crc, crc1;
int i; int i;
char *temp;
if (! check_free()) if (! check_free())
return; return;
@ -1461,6 +1462,14 @@ void global_menu(void)
Syslog('+', "Main config, installed convert for thumbnails"); Syslog('+', "Main config, installed convert for thumbnails");
} }
temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s/magic", getenv("MBSE_ROOT"));
if (strcmp(CFG.req_magic, temp) == 0) {
sprintf(CFG.req_magic, "%s/var/magic", getenv("MBSE_ROOT"));
Syslog('+', "Main config, magic dir moved to %s", CFG.req_magic);
}
free(temp);
if (!CFG.is_upgraded) { if (!CFG.is_upgraded) {
CFG.priority = 15; CFG.priority = 15;
#ifdef __linux__ #ifdef __linux__

View File

@ -182,7 +182,7 @@ void load_maincfg(void)
sprintf(CFG.uxpath, "%s", getenv("MBSE_ROOT")); sprintf(CFG.uxpath, "%s", getenv("MBSE_ROOT"));
sprintf(CFG.badtic, "%s/var/badtic", getenv("MBSE_ROOT")); sprintf(CFG.badtic, "%s/var/badtic", getenv("MBSE_ROOT"));
sprintf(CFG.ticout, "%s/var/ticqueue", getenv("MBSE_ROOT")); sprintf(CFG.ticout, "%s/var/ticqueue", getenv("MBSE_ROOT"));
sprintf(CFG.req_magic, "%s/magic", getenv("MBSE_ROOT")); sprintf(CFG.req_magic, "%s/var/magic", getenv("MBSE_ROOT"));
sprintf(CFG.alists_path, "%s/var/arealists", getenv("MBSE_ROOT")); sprintf(CFG.alists_path, "%s/var/arealists", getenv("MBSE_ROOT"));
sprintf(CFG.out_queue, "%s/var/queue", getenv("MBSE_ROOT")); sprintf(CFG.out_queue, "%s/var/queue", getenv("MBSE_ROOT"));
sprintf(CFG.rulesdir, "%s/var/rules", getenv("MBSE_ROOT")); sprintf(CFG.rulesdir, "%s/var/rules", getenv("MBSE_ROOT"));