* this file must be kept in a non-volatile dir. move it over in the postinst script...
authorWilfried Göesgens <willi@citadel.org>
Fri, 27 Apr 2007 17:40:11 +0000 (17:40 +0000)
committerWilfried Göesgens <willi@citadel.org>
Fri, 27 Apr 2007 17:40:11 +0000 (17:40 +0000)
citadel/citadel_dirs.c
citadel/debian/citadel-server.postinst

index 14be715592edf0a8b7815a9f1422c5658fc26165..f520dfc4c4f18bf95db6559f506ca84caaab093c 100644 (file)
@@ -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",
index 2134314132b2975a298f3073bb4b523e4e5539d8..2f4d517d46978cc7ac5099e924a90022c8c203eb 100644 (file)
@@ -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