aboutsummaryrefslogtreecommitdiffstats
path: root/misc/afbackup/files/patch-ac
blob: 26feb13f6c8c44e4e9d7172956bdf3781a3ba26e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
--- full_backup.c.orig  Tue Oct  9 08:09:00 2001
+++ full_backup.c   Fri Nov  2 15:51:10 2001
@@ -165,6 +165,7 @@
 UChar  *default_paramfiles[] = { DEFAULT_CLIENT_CONFIGFILES , NULL };
 
 UChar  *bindir = NULL;
+UChar  *libexecdir = NULL;
 UChar  *vardir = NULL;
 UChar  *libdir = NULL;
 UChar  *confdir = NULL;
@@ -172,6 +173,7 @@
 
 ReplSpec   dir_pat_repl[] = {
    { "%B", NULL, &bindir },
+   { "%E", NULL, &libexecdir },
    { "%L", NULL, &libdir },
    { "%V", NULL, &vardir },
    { "%C", NULL, &confdir },
@@ -1408,12 +1410,13 @@
 
   /* construct file- and dirnames */
   bindir = strapp(backuphome, FN_DIRSEPSTR "bin");
+  libexecdir = strapp(backuphome, FN_DIRSEPSTR "libexecdir");
   vardir = strapp(backuphome, FN_DIRSEPSTR "var");
   libdir = strapp(backuphome, FN_DIRSEPSTR "lib");
   logdir = strdup(vardir);
   confdir = strdup(libdir);
 
-  if(!bindir || !vardir || !libdir || !logdir || !confdir)
+  if(!bindir || !vardir || !libdir || !logdir || !confdir || !libexecdir)
     nomemerrexit();
 
   if(!paramfile)
@@ -1424,6 +1427,7 @@
   if(!backuphome){
      /* construct file- and dirnames */
      bindir = DEFBINDIR;
+     libexecdir = DEFLIBEXECDIR;
      vardir = DEFVARDIR;
      libdir = DEFLIBDIR;
      logdir = DEFLOGDIR;
@@ -1444,13 +1448,14 @@
    }
      }
      ZFREE(cptr);
+     libexecdir = strapp(backuphome, FN_DIRSEPSTR "libexec/afbackup");
      vardir = strapp(backuphome, FN_DIRSEPSTR "var");
      libdir = strapp(backuphome, FN_DIRSEPSTR "lib");
      logdir = strapp(backuphome, FN_DIRSEPSTR "var");
      confdir = strapp(backuphome, FN_DIRSEPSTR "lib");
   }
 
-  if(!bindir || !vardir || !libdir || !logdir || !confdir)
+  if(!bindir || !vardir || !libdir || !logdir || !confdir || !libexecdir)
      nomemerrexit();
 
   if(!paramfile)
@@ -1522,8 +1527,8 @@
   if(!dont_compress_str)
     dont_compress_str = "";
   num_dont_compress = str2wordsq(&dont_compress, dont_compress_str);
-  piperprogram = strapp(bindir, FN_DIRSEPSTR "__piper");
-  zprogram = strapp(bindir, FN_DIRSEPSTR "__z");
+  piperprogram = strapp(libexecdir, FN_DIRSEPSTR "__piper");
+  zprogram = strapp(libexecdir, FN_DIRSEPSTR "__z");
   server_ids_file = strapp(vardir, FN_DIRSEPSTR "server_ids");
   index_ages_file = strapp(vardir, FN_DIRSEPSTR "index_ages");
   if(!paramfile || !partfile || !oldmarkfile || !orgoldmarkfile