[mw-devel] MW3 r1030 - trunk/src

welshbyte at sucs.org welshbyte at sucs.org
Wed Apr 2 23:33:46 BST 2008


Author: welshbyte
Date: 2008-04-02 23:33:46 +0100 (Wed, 02 Apr 2008)
New Revision: 1030

Modified:
   trunk/src/Makefile
   trunk/src/bb.h
   trunk/src/files.h
   trunk/src/mesg.c
Log:
Make the fifo dir configurable, default /var/run/mw, and put who.bb in there too


Modified: trunk/src/Makefile
===================================================================
--- trunk/src/Makefile	2008-04-02 19:17:13 UTC (rev 1029)
+++ trunk/src/Makefile	2008-04-02 22:33:46 UTC (rev 1030)
@@ -3,6 +3,7 @@
 bindir ?= /usr/local/bin
 localstatedir ?= /var
 LOGDIR := $(localstatedir)/log/mw
+MSGDIR := $(localstatedir)/run/mw
 STATEDIR := $(localstatedir)/lib/mw
 HOMEPATH := $(libdir)/mw
 TMPDIR = /tmp
@@ -34,6 +35,7 @@
 DEFS+= -DHOMEPATH=\"$(HOMEPATH)\"
 DEFS+= -DLOGDIR=\"$(LOGDIR)\"
 DEFS+= -DSTATEDIR=\"$(STATEDIR)\"
+DEFS+= -DMSGDIR=\"$(MSGDIR)\"
 
 ### uncomment for add Electric fence
 #LDFLAGS+= -L. -lefence
@@ -105,6 +107,7 @@
 install: mw
 	install -Ds mw $(bindir)/mw
 	install -d $(LOGDIR)
+	install -d $(MSGDIR)
 	install -d $(STATEDIR)
 
 clean:

Modified: trunk/src/bb.h
===================================================================
--- trunk/src/bb.h	2008-04-02 19:17:13 UTC (rev 1029)
+++ trunk/src/bb.h	2008-04-02 22:33:46 UTC (rev 1030)
@@ -20,6 +20,10 @@
 #define STATEDIR	"/var/lib/mw"
 #endif
 
+#ifndef MSGDIR
+#define MSGDIR		"/var/run/mw"
+#endif
+
 #define LOGFILE		LOGDIR"/log.bb"
 #define LOGIN_BANNER	"login.banner"
 #define DEVEL_BANNER	"login.banner.devel"

Modified: trunk/src/files.h
===================================================================
--- trunk/src/files.h	2008-04-02 19:17:13 UTC (rev 1029)
+++ trunk/src/files.h	2008-04-02 22:33:46 UTC (rev 1030)
@@ -6,7 +6,7 @@
 
 #define FOLDERFILE  STATEDIR"/folders.bb"
 #define USERFILE    STATEDIR"/users.bb"
-#define WHOFILE     STATEDIR"/who.bb"
+#define WHOFILE     MSGDIR"/who.bb"
 
 int openfolderfile(int mode);
 int nofolders(void);

Modified: trunk/src/mesg.c
===================================================================
--- trunk/src/mesg.c	2008-04-02 19:17:13 UTC (rev 1029)
+++ trunk/src/mesg.c	2008-04-02 22:33:46 UTC (rev 1030)
@@ -14,7 +14,7 @@
 char *get_pipe_name(int pid)
 {
 	static char fullpath[MAXTEXTLENGTH];
-	snprintf(fullpath,MAXTEXTLENGTH-1,"%s/mesgs/bbs.%d",HOMEPATH,pid);
+	snprintf(fullpath,MAXTEXTLENGTH-1,"%s/bbs.%d",MSGDIR,pid);
 	return(fullpath);
 }
 





More information about the mw-devel mailing list