$Log$
+ Revision 608.12 2003/07/30 00:26:50 ajc
+ * Removed the "weekly" script and began installing a facility to allow
+ database maintenance to happen automatically. (One Step Install can't
+ require the sysadmin to know cron)
+
Revision 608.11 2003/07/28 04:17:24 ajc
* migratenet.c: removed. Adjusted Makefile.in accordingly.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
$(INSTALL_DATA) $$i $(root)$(prefix)/$$i; \
done
-install-exec: all weekly
+install-exec: all
@for i in bio bitbucket files images info userpics; do \
$(srcdir)/mkinstalldirs $(root)$(prefix)/$$i; \
done
$(INSTALL) $$i $(root)$(prefix)/$$i; \
fi \
done
- @for i in utilsmenu weekly ; do \
+ @for i in utilsmenu ; do \
if test -f $(srcdir)/$$i; then \
echo $(INSTALL) $(srcdir)/$$i $(root)$(prefix)/$$i; \
$(INSTALL) $(srcdir)/$$i $(root)$(prefix)/$$i; \
distclean: cleaner
find . -name '*~' -o -name '.#*' | xargs rm -f
- rm -f Makefile sysdep.h config.cache config/.og config.status *.d weekly
+ rm -f Makefile sysdep.h config.cache config/.og config.status *.d
.c.d:
@echo Checking dependencies for $<
$(srcdir)/aclocal.m4: $(srcdir)/acinclude.m4
cd $(srcdir) && $(ACLOCAL)
-weekly: $(srcdir)/weekly.in config.status
- CONFIG_FILES=weekly CONFIG_HEADERS= $(SHELL) ./config.status
-
-include $(DEP_FILES)
/*
* Text description of this software
*/
-#define CITADEL "Citadel/UX 6.08"
+#define CITADEL "Citadel/UX 6.09"
/*
* REV_LEVEL is the current version number (multiplied by 100 to avoid having
* usually more strict because you're not really supposed to dump/load and
* upgrade at the same time.
*/
-#define REV_LEVEL 608 /* This version */
+#define REV_LEVEL 609 /* This version */
#define REV_MIN 591 /* Oldest compatible database */
-#define EXPORT_REV_MIN 608 /* Oldest compatible export files */
+#define EXPORT_REV_MIN 609 /* Oldest compatible export files */
#define SERVER_TYPE 0 /* zero for stock Citadel/UX; other developers please
obtain SERVER_TYPE codes for your implementations */
char c_aide_mailboxes; /* give Aides access to mailboxes */
char c_baseroom[ROOMNAMELEN]; /* Name of baseroom (Lobby) */
char c_aideroom[ROOMNAMELEN]; /* Name of aideroom (Aide) */
+ int c_purge_hour; /* Hour during which db purges run */
};
/*
File C:\cygwin\home\error\cvs\citadel\citserver.exe
File C:\cygwin\bin\cygz.dll
File C:\cygwin\home\error\cvs\citadel\base64.exe
-File C:\cygwin\home\error\cvs\citadel\weekly
File C:\cygwin\home\error\cvs\citadel\setup.exe
File C:\cygwin\home\error\cvs\citadel\sendcommand.exe
File C:\cygwin\home\error\cvs\citadel\docs\citadel.html
Delete /rebootok "$INSTDIR\rxvt.exe"
Delete /rebootok "$INSTDIR\citserver.exe"
Delete /rebootok "$INSTDIR\base64.exe"
-Delete /rebootok "$INSTDIR\weekly"
Delete /rebootok "$INSTDIR\setup.exe"
Delete /rebootok "$INSTDIR\aidepost.exe"
Delete /rebootok "$INSTDIR\citmail.exe"
/usr/local/citadel/stats
/usr/local/citadel/userlist
/usr/local/citadel/utilsmenu
-/usr/local/citadel/weekly
/usr/local/citadel/modules/libbio.so
/usr/local/citadel/modules/libbio.la
/usr/local/citadel/modules/libchat.so
AC_SUBST(SERVER_LIBS)
AC_SUBST(SETUP_LIBS)
AC_CONFIG_HEADER(sysdep.h)
-AC_CONFIG_FILES([Makefile weekly])
+AC_CONFIG_FILES([Makefile])
AC_OUTPUT
if test -z "$DATABASE"; then
#include "tools.h"
#include "serv_upgrade.h"
-void do_pre555_user_upgrade(void) {
- struct pre555user usbuf;
- struct ctdluser newus;
- struct cdbdata *cdbus;
- char tempfilename[PATH_MAX];
- FILE *fp, *tp;
- static char vcard[1024];
-
- lprintf(5, "Upgrading user file\n");
- fp = tmpfile();
- if (fp == NULL) {
- lprintf(1, "%s\n", strerror(errno));
- exit(errno);
- }
- strcpy(tempfilename, tmpnam(NULL));
-
- /* First, back out all old version records to a flat file */
- cdb_rewind(CDB_USERS);
- while(cdbus = cdb_next_item(CDB_USERS), cdbus != NULL) {
- memset(&usbuf, 0, sizeof(struct pre555user));
- memcpy(&usbuf, cdbus->ptr,
- ( (cdbus->len > sizeof(struct pre555user)) ?
- sizeof(struct pre555user) : cdbus->len) );
- cdb_free(cdbus);
- fwrite(&usbuf, sizeof(struct pre555user), 1, fp);
- }
-
- /* ...and overwrite the records with new format records */
- rewind(fp);
- while (fread(&usbuf, sizeof(struct pre555user), 1, fp) > 0) {
- if (strlen(usbuf.fullname) > 0) {
- lprintf(9, "Upgrading <%s>\n", usbuf.fullname);
- memset(&newus, 0, sizeof(struct ctdluser));
-
- newus.uid = usbuf.USuid;
- strcpy(newus.password, usbuf.password);
- newus.flags = usbuf.flags;
- newus.timescalled = (long) usbuf.timescalled;
- newus.posted = (long) usbuf.posted;
- newus.axlevel = (cit_uint8_t) usbuf.axlevel;
- newus.usernum = (long) usbuf.usernum;
- newus.lastcall = (long) usbuf.lastcall;
- newus.USuserpurge = (int) usbuf.USuserpurge;
- strcpy(newus.fullname, usbuf.fullname);
- newus.USscreenwidth = (cit_uint8_t) usbuf.USscreenwidth;
- newus.USscreenheight = (cit_uint8_t) usbuf.USscreenheight;
-
- putuser(&newus);
-
- /* write the vcard */
- snprintf(vcard, sizeof vcard,
- "Content-type: text/x-vcard\n\n"
- "begin:vcard\n"
- "n:%s\n"
- "tel;home:%s\n"
- "email;internet:%s\n"
- "adr:;;%s;%s;%s;%s;USA\n"
- "end:vcard\n",
- usbuf.USname,
- usbuf.USphone,
- usbuf.USemail,
- usbuf.USaddr,
- usbuf.UScity,
- usbuf.USstate,
- usbuf.USzip);
-
- tp = fopen(tempfilename, "w");
- fwrite(vcard, strlen(vcard)+1, 1, tp);
- fclose(tp);
-
- CtdlWriteObject(USERCONFIGROOM, "text/x-vcard",
- tempfilename, &newus, 0, 1, CM_SKIP_HOOKS);
- unlink(tempfilename);
- }
- }
-
- fclose(fp); /* this file deletes automatically */
-}
-
-
-
-
-
-
/*
return;
}
-
/*
- * This field was originally used for something else, so when we upgrade
- * we have to initialize it to 0 in case there was trash in that space.
+ * Do various things to our configuration file
*/
-void initialize_c_rfc822_strict_from(void) {
+void update_config(void) {
get_config();
- config.c_rfc822_strict_from = 0;
+
+ if (CitControl.version < 606) {
+ config.c_rfc822_strict_from = 0;
+ }
+
+ if (CitControl.version < 609) {
+ config.c_purge_hour = 3;
+ }
+
put_config();
}
return;
}
- if (CitControl.version < 555) do_pre555_user_upgrade();
+ update_config();
+
+ if (CitControl.version < 555) {
+ lprintf(1, "Your data files are from a version of Citadel\n"
+ "that is too old to be upgraded. Sorry.\n");
+ exit(EXIT_FAILURE);
+ }
+
if (CitControl.version < 591) bump_mailbox_generation_numbers();
- if (CitControl.version < 606) initialize_c_rfc822_strict_from();
if (CitControl.version < 608) convert_bbsuid_to_minusone();
CitControl.version = REV_LEVEL;
}
-
-
-
-
-
-
-
-
-
char *serv_upgrade_init(void)
{
check_server_upgrades();
*
*/
-/*
- * Format of a user record prior to version 5.55
- */
-struct pre555user { /* User record */
- int USuid; /* userid (==BBSUID for bbs only) */
- char password[20]; /* password (for BBS-only users) */
- unsigned flags; /* See US_ flags below */
- int timescalled; /* Total number of logins */
- int posted; /* Number of messages posted (ever) */
- char fullname[26]; /* Name for Citadel messages & mail */
- char axlevel; /* Access level */
- cit_uint8_t USscreenwidth; /* Screen width (for textmode users)*/
- cit_uint8_t USscreenheight; /* Screen height(for textmode users)*/
- long usernum; /* User number (never recycled) */
- time_t lastcall; /* Last time the user called */
- char USname[30]; /* */
- char USaddr[25]; /* */
- char UScity[15]; /* */
- char USstate[3]; /* */
- char USzip[10]; /* */
- char USphone[11]; /* */
- char USemail[32]; /* */
- int USuserpurge; /* Purge time (in days) for user */
-};
cprintf("%d\n", config.c_max_workers);
cprintf("%d\n", config.c_pop3_port);
cprintf("%d\n", config.c_smtp_port);
+ cprintf("%d\n", config.c_purge_hour);
/* Export the control file */
get_control();
client_gets(buf); config.c_max_workers = atoi(buf);
client_gets(buf); config.c_pop3_port = atoi(buf);
client_gets(buf); config.c_smtp_port = atoi(buf);
+ client_gets(buf); config.c_purge_hour = atoi(buf);
put_config();
lprintf(7, "Imported config file\n");
}
old_setup_level = config.c_setup_level;
- if (old_setup_level == 0)
+ if (old_setup_level == 0) {
goto NEW_INST;
+ }
- if (old_setup_level < 323) {
+ if (old_setup_level < 555) {
important_message("Citadel/UX Setup",
"This Citadel/UX installation is too old "
"to be upgraded.");
}
write_config_to_disk();
- if ((config.c_setup_level / 10) == 32) {
- important_msgnum(31);
- cleanup(0);
- }
- if (config.c_setup_level < 400) {
- config.c_setup_level = 400;
- }
- /* end of 3.23 -> 4.00 update section */
-
- /* end of 4.00 -> 4.02 update section */
-
old_setup_level = config.c_setup_level;
/* end of version update section */
mkdir("images", 0700);
mkdir("netconfigs", 0700);
- /* Delete a bunch of old files from Citadel v4; don't need anymore */
+ /* Delete files and directories used by older Citadel versions */
system("rm -fr ./chatpipes ./expressmsgs ./sessions 2>/dev/null");
-
- /* Delete the old citadel.log file; this facility has been removed */
unlink("citadel.log");
+ unlink("weekly");
check_services_entry(); /* Check /etc/services */
#ifndef __CYGWIN__