forked from pool/atheme
This commit is contained in:
parent
c8492f3db8
commit
ecf924d820
@ -1,247 +0,0 @@
|
||||
Index: Makefile.in
|
||||
===================================================================
|
||||
--- Makefile.in (revision 7282)
|
||||
+++ Makefile.in (working copy)
|
||||
@@ -18,6 +18,7 @@
|
||||
sysconfdir = @sysconfdir@
|
||||
libdir = @libdir@
|
||||
sbindir = @sbindir@
|
||||
+localstatedir=@localstatedir@
|
||||
DOCDIR = @DOCDIR@
|
||||
MODDIR = @MODDIR@
|
||||
SHAREDIR = @SHAREDIR@
|
||||
Index: src/Makefile.in
|
||||
===================================================================
|
||||
--- src/Makefile.in (revision 7282)
|
||||
+++ src/Makefile.in (working copy)
|
||||
@@ -18,8 +18,12 @@
|
||||
sysconfdir = @sysconfdir@
|
||||
libdir = @libdir@
|
||||
sbindir = @sbindir@
|
||||
+localstatedir=@localstatedir@
|
||||
DOCDIR = @DOCDIR@
|
||||
MODDIR = @MODDIR@
|
||||
+DATADIR = @DATADIR@
|
||||
+RUNDIR = @RUNDIR@
|
||||
+LOGDIR = @LOGDIR@
|
||||
SHAREDIR = @SHAREDIR@
|
||||
BIN = atheme@EXEEXT@
|
||||
MKDEP = @MKDEP@
|
||||
@@ -101,16 +105,19 @@
|
||||
|
||||
install: build
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(prefix)
|
||||
- $(INSTALL) -m 755 -d $(DESTDIR)$(prefix)/bin
|
||||
- $(INSTALL) -m 755 -d $(DESTDIR)$(prefix)/etc
|
||||
- $(INSTALL) -m 755 -d $(DESTDIR)$(prefix)/var
|
||||
+ $(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
|
||||
+ $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)
|
||||
+ $(INSTALL) -m 755 -d $(DESTDIR)$(localstatedir)
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCDIR)
|
||||
+ $(INSTALL) -m 755 -d $(DESTDIR)$(LOGDIR)
|
||||
+ $(INSTALL) -m 755 -d $(DESTDIR)$(RUNDIR)
|
||||
+ $(INSTALL) -m 755 -d $(DESTDIR)$(DATADIR)
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(SHAREDIR)/help
|
||||
- $(INSTALL) -m 755 -c $(BIN) $(DESTDIR)$(prefix)/bin
|
||||
- $(INSTALL) -m 640 -c ../dist/example.conf $(DESTDIR)$(prefix)/etc
|
||||
- $(INSTALL) -m 640 -c ../dist/example.motd $(DESTDIR)$(prefix)/etc
|
||||
- $(INSTALL) -m 640 -c ../dist/example.userserv.conf $(DESTDIR)$(prefix)/etc
|
||||
- $(INSTALL) -m 640 -c ../dist/atheme.chk $(DESTDIR)$(prefix)/etc/atheme.chk.sample
|
||||
+ $(INSTALL) -m 755 -c $(BIN) $(DESTDIR)$(bindir)
|
||||
+ $(INSTALL) -m 640 -c ../dist/example.conf $(DESTDIR)$(sysconfdir)
|
||||
+ $(INSTALL) -m 640 -c ../dist/example.motd $(DESTDIR)$(sysconfdir)
|
||||
+ $(INSTALL) -m 640 -c ../dist/example.userserv.conf $(DESTDIR)$(sysconfdir)
|
||||
+ $(INSTALL) -m 640 -c ../dist/atheme.chk $(DESTDIR)$(sysconfdir)/atheme.chk.sample
|
||||
(cd ../doc; for i in *; do $(INSTALL) -m 644 $$i $(DESTDIR)$(DOCDIR); done)
|
||||
(cd ../help; for i in *; do \
|
||||
[ -f $$i ] && $(INSTALL) -m 644 $$i $(DESTDIR)$(SHAREDIR)/help; \
|
||||
Index: src/atheme.c
|
||||
===================================================================
|
||||
--- src/atheme.c (revision 7282)
|
||||
+++ src/atheme.c (working copy)
|
||||
@@ -59,7 +59,7 @@
|
||||
char buf[32];
|
||||
int i, pid, r;
|
||||
FILE *pid_file;
|
||||
- char *pidfilename = "var/atheme.pid";
|
||||
+ char *pidfilename = RUNDIR "/atheme.pid";
|
||||
#ifndef _WIN32
|
||||
struct rlimit rlim;
|
||||
#endif
|
||||
@@ -121,10 +121,10 @@
|
||||
}
|
||||
|
||||
if (have_conf == FALSE)
|
||||
- config_file = sstrdup("etc/atheme.conf");
|
||||
+ config_file = sstrdup(SYSCONFDIR "/atheme.conf");
|
||||
|
||||
if (have_log == FALSE)
|
||||
- log_path = sstrdup("var/atheme.log");
|
||||
+ log_path = sstrdup(LOGDIR "/atheme.log");
|
||||
|
||||
cold_start = TRUE;
|
||||
|
||||
Index: src/ptasks.c
|
||||
===================================================================
|
||||
--- src/ptasks.c (revision 7282)
|
||||
+++ src/ptasks.c (working copy)
|
||||
@@ -318,7 +318,7 @@
|
||||
if (floodcheck(u, NULL))
|
||||
return;
|
||||
|
||||
- f = fopen("etc/atheme.motd", "r");
|
||||
+ f = fopen(SYSCONFDIR "/atheme.motd", "r");
|
||||
if (!f)
|
||||
{
|
||||
numeric_sts(me.name, 422, u->nick, ":The MOTD file is unavailable.");
|
||||
Index: backend/flatfile.c
|
||||
===================================================================
|
||||
--- backend/flatfile.c (revision 7282)
|
||||
+++ backend/flatfile.c (working copy)
|
||||
@@ -104,7 +104,7 @@
|
||||
muout = 0, mcout = 0, caout = 0, kout = 0;
|
||||
|
||||
/* write to a temporary file first */
|
||||
- if (!(f = fopen("etc/atheme.db.new", "w")))
|
||||
+ if (!(f = fopen(DATADIR "/atheme.db.new", "w")))
|
||||
{
|
||||
errno1 = errno;
|
||||
slog(LG_ERROR, "db_save(): cannot create atheme.db.new: %s", strerror(errno1));
|
||||
@@ -236,10 +236,10 @@
|
||||
/* now, replace the old database with the new one, using an atomic rename */
|
||||
|
||||
#ifdef _WIN32
|
||||
- unlink( "etc/atheme.db" );
|
||||
+ unlink(DATADIR "/atheme.db" );
|
||||
#endif
|
||||
|
||||
- if ((rename("etc/atheme.db.new", "etc/atheme.db")) < 0)
|
||||
+ if ((rename(DATADIR "/atheme.db.new", DATADIR "/atheme.db")) < 0)
|
||||
{
|
||||
errno1 = errno;
|
||||
slog(LG_ERROR, "db_save(): cannot rename atheme.db.new to atheme.db: %s", strerror(errno1));
|
||||
@@ -260,7 +260,7 @@
|
||||
FILE *f;
|
||||
char *item, *s, dBuf[BUFSIZE];
|
||||
|
||||
- f = fopen("etc/atheme.db", "r");
|
||||
+ f = fopen(DATADIR "/atheme.db", "r");
|
||||
if (f == NULL)
|
||||
{
|
||||
slog(LG_ERROR, "db_load(): can't open atheme.db for reading: %s", strerror(errno));
|
||||
Index: configure.ac
|
||||
===================================================================
|
||||
--- configure.ac (revision 7282)
|
||||
+++ configure.ac (working copy)
|
||||
@@ -148,6 +148,9 @@
|
||||
DOCDIR='${prefix}/doc'
|
||||
MODDIR='${exec_prefix}'
|
||||
SHAREDIR='${prefix}'
|
||||
+LOGDIR="var/"
|
||||
+DATADIR="etc/"
|
||||
+RUNDIR="var/"
|
||||
|
||||
FHSPATHS="no"
|
||||
AC_MSG_CHECKING(if you want FHS-like pathnames)
|
||||
@@ -160,6 +163,9 @@
|
||||
DOCDIR='${datadir}/doc/atheme'
|
||||
MODDIR='${libdir}/atheme'
|
||||
SHAREDIR='${datadir}/atheme'
|
||||
+ LOGDIR="${localstatedir}/log/atheme"
|
||||
+ DATADIR="${localstatedir}/lib/atheme"
|
||||
+ RUNDIR="${localstatedir}/run/atheme"
|
||||
;;
|
||||
no)
|
||||
FHSPATHS="no"
|
||||
@@ -170,6 +176,9 @@
|
||||
AC_SUBST(DOCDIR)
|
||||
AC_SUBST(MODDIR)
|
||||
AC_SUBST(SHAREDIR)
|
||||
+AC_SUBST(DATADIR)
|
||||
+AC_SUBST(LOGDIR)
|
||||
+AC_SUBST(RUNDIR)
|
||||
dnl the following is wrong! -- jilles
|
||||
dnl AC_DEFINE_UNQUOTED([MODDIR], "${MODDIR}", [Module root directory.])
|
||||
|
||||
@@ -541,7 +550,7 @@
|
||||
LDFLAGS=${ac_save_LDFLAGS}
|
||||
])
|
||||
|
||||
-ac_save_CFLAGS="${CFLAGS} ${orig_CFLAGS} ${CWARNS} -DPREFIX=\\\"\${prefix}\\\" -DMODDIR=\\\"\${MODDIR}\\\" -DSHAREDIR=\\\"${SHAREDIR}\\\""
|
||||
+ac_save_CFLAGS="${CFLAGS} ${orig_CFLAGS} ${CWARNS} -DPREFIX=\\\"\${prefix}\\\" -DMODDIR=\\\"\${MODDIR}\\\" -DSHAREDIR=\\\"${SHAREDIR}\\\" -DSYSCONFDIR=\\\"${sysconfdir}\\\" -DLOGDIR=\\\"${LOGDIR}\\\" -DRUNDIR=\\\"${RUNDIR}\\\" -DDATADIR=\\\"${DATADIR}\\\""
|
||||
CFLAGS=${ac_save_CFLAGS}
|
||||
dnl export CFLAGS
|
||||
|
||||
@@ -572,6 +581,10 @@
|
||||
Atheme version : ${PACKAGE_VERSION}
|
||||
Installation prefix : ${prefix}
|
||||
Module root directory: `eval echo $d`
|
||||
+ Config directory : ${sysconfdir}
|
||||
+ Logfile directory : ${LOGDIR}
|
||||
+ Data directory : ${DATADIR}
|
||||
+ PID directory : ${RUNDIR}
|
||||
Large network support: ${LARGENET}
|
||||
PostgreSQL support : ${POSTGRESQL}
|
||||
OpenSSL SASL support : ${SSL}
|
||||
Index: modules/operserv/clones.c
|
||||
===================================================================
|
||||
--- modules/operserv/clones.c (revision 7282)
|
||||
+++ modules/operserv/clones.c (working copy)
|
||||
@@ -153,7 +153,7 @@
|
||||
node_t *n;
|
||||
cexcept_t *c;
|
||||
|
||||
- if (!(f = fopen("etc/exempts.db.new", "w")))
|
||||
+ if (!(f = fopen(DATADIR "/exempts.db.new", "w")))
|
||||
{
|
||||
slog(LG_ERROR, "write_exemptdb(): cannot write exempt database: %s", strerror(errno));
|
||||
return;
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
fclose(f);
|
||||
|
||||
- if ((rename("etc/exempts.db.new", "etc/exempts.db")) < 0)
|
||||
+ if ((rename(DATADIR "/exempts.db.new", DATADIR "/exempts.db")) < 0)
|
||||
{
|
||||
slog(LG_ERROR, "write_exemptdb(): couldn't rename exempts database.");
|
||||
return;
|
||||
@@ -180,7 +180,7 @@
|
||||
FILE *f;
|
||||
char *item, rBuf[BUFSIZE * 2], *p;
|
||||
|
||||
- if (!(f = fopen("etc/exempts.db", "r")))
|
||||
+ if (!(f = fopen(DATADIR "/exempts.db", "r")))
|
||||
{
|
||||
slog(LG_DEBUG, "load_exemptdb(): cannot open exempt database: %s", strerror(errno));
|
||||
return;
|
||||
Index: modules/operserv/rwatch.c
|
||||
===================================================================
|
||||
--- modules/operserv/rwatch.c (revision 7282)
|
||||
+++ modules/operserv/rwatch.c (working copy)
|
||||
@@ -109,7 +109,7 @@
|
||||
node_t *n;
|
||||
rwatch_t *rw;
|
||||
|
||||
- if (!(f = fopen("etc/rwatch.db.new", "w")))
|
||||
+ if (!(f = fopen(DATADIR "/rwatch.db.new", "w")))
|
||||
{
|
||||
slog(LG_ERROR, "write_rwatchdb(): cannot write rwatch database: %s", strerror(errno));
|
||||
return;
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
fclose(f);
|
||||
|
||||
- if ((rename("etc/rwatch.db.new", "etc/rwatch.db")) < 0)
|
||||
+ if ((rename(DATADIR "/rwatch.db.new", DATADIR "/rwatch.db")) < 0)
|
||||
{
|
||||
slog(LG_ERROR, "write_rwatchdb(): couldn't rename rwatch database.");
|
||||
return;
|
||||
@@ -137,7 +137,7 @@
|
||||
char *item, rBuf[BUFSIZE * 2];
|
||||
rwatch_t *rw = NULL;
|
||||
|
||||
- if (!(f = fopen("etc/rwatch.db", "r")))
|
||||
+ if (!(f = fopen(DATADIR "/rwatch.db", "r")))
|
||||
{
|
||||
slog(LG_DEBUG, "load_rwatchdb(): cannot open rwatch database: %s", strerror(errno));
|
||||
return;
|
Loading…
x
Reference in New Issue
Block a user