From aa89997afbe561ecb2ecb9bc2fd98a6950951747 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Fri, 27 Apr 2007 17:40:11 +0000 Subject: [PATCH] * this file must be kept in a non-volatile dir. move it over in the postinst script if its there. --- citadel/citadel_dirs.c | 11 ++++++----- citadel/debian/citadel-server.postinst | 4 ++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/citadel/citadel_dirs.c b/citadel/citadel_dirs.c index 14be71559..f520dfc4c 100644 --- a/citadel/citadel_dirs.c +++ b/citadel/citadel_dirs.c @@ -39,6 +39,7 @@ char ctdl_message_dir[PATH_MAX]="messages"; char ctdl_usrpic_dir[PATH_MAX]="userpics"; char ctdl_bbsbase_dir[PATH_MAX]=""; char ctdl_etc_dir[PATH_MAX]=""; +/* attention! this may be non volatile on some oses */ char ctdl_run_dir[PATH_MAX]=""; char ctdl_spool_dir[PATH_MAX]="network"; char ctdl_netout_dir[PATH_MAX]="network/spoolout"; @@ -143,6 +144,11 @@ void calc_dirs_n_files(int relh, int home, const char *relhome,const char *ctdl /* ok, now we know the dirs, calc some commonly used files */ + snprintf(file_arcq, + sizeof file_arcq, + "%srefcount_adjustments.dat", + ctdl_etc_dir); + snprintf(file_citadel_control, sizeof file_citadel_control, "%scitadel.control", @@ -178,11 +184,6 @@ void calc_dirs_n_files(int relh, int home, const char *relhome,const char *ctdl "%scitadel.pid", ctdl_run_dir); - snprintf(file_arcq, - sizeof file_arcq, - "%srefcount_adjustments.dat", - ctdl_run_dir); - snprintf(file_crpt_file_key, sizeof file_crpt_file_key, "%scitadel.key", diff --git a/citadel/debian/citadel-server.postinst b/citadel/debian/citadel-server.postinst index 213431413..2f4d517d4 100644 --- a/citadel/debian/citadel-server.postinst +++ b/citadel/debian/citadel-server.postinst @@ -7,6 +7,10 @@ set -e . /usr/share/debconf/confmodule db_version 2.0 +# glitch: this mustn't be in /var/run/ +if test -f /var/run/refcount_adjustments.dat; then + mv /var/run/refcount_adjustments.dat /etc/citadel/ +fi case "$1" in configure) chown -R citadel:citadel /etc/citadel -- 2.39.2