]>
Commit | Line | Data |
---|---|---|
291cd762 ER |
1 | --- apcupsd-3.14.13/./autoconf/config.h.in~ 2015-01-02 19:12:47.000000000 +0200 |
2 | +++ apcupsd-3.14.13/./autoconf/config.h.in 2015-09-16 16:40:33.785163382 +0300 | |
3 | @@ -295,6 +295,9 @@ | |
4 | /* Default directory in which log is written */ | |
b8fc1ff3 AA |
5 | #undef LOGDIR |
6 | ||
7 | +/* Define the default "status" files directory. */ | |
8 | +#undef STATDIR | |
c1556a3f | 9 | + |
291cd762 ER |
10 | /* Default port number for NIS server */ |
11 | #undef NISPORT | |
b8fc1ff3 | 12 | |
291cd762 ER |
13 | --- apcupsd-3.14.13/autoconf/configure.in~ 2015-09-16 16:36:41.000000000 +0300 |
14 | +++ apcupsd-3.14.13/autoconf/configure.in 2015-09-16 16:37:57.190362425 +0300 | |
e717fc6c JB |
15 | @@ -14,7 +14,7 @@ dnl Config header file. |
16 | AC_CONFIG_HEADER(include/apcconfig.h:autoconf/config.h.in) | |
17 | ||
18 | topdir=`pwd` | |
19 | -AC_CONFIG_AUX_DIR(${topdir}/autoconf) | |
20 | +AC_CONFIG_AUX_DIR([autoconf]) | |
21 | ||
22 | dnl | |
23 | dnl Absolute srcdir | |
24 | @@ -887,9 +887,6 @@ dnl If the AC_CONFIG_AUX_DIR macro for a | |
25 | dnl find the mkinstalldirs script in another subdir than ($topdir). | |
26 | dnl Try to locate it. | |
27 | MKINSTALLDIRS= | |
28 | -if test -n "$ac_aux_dir"; then | |
29 | - MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" | |
30 | -fi | |
31 | if test x$MKINSTALLDIRS = x ; then | |
32 | MKINSTALLDIRS="\$(topdir)/autoconf/mkinstalldirs" | |
33 | fi | |
27baa584 | 34 | @@ -1261,16 +1261,25 @@ |
c1556a3f | 35 | # Find the default directory to put the root-mode PID file in |
36 | for PIDDIR in "/var/run" "/etc/apcupsd" | |
37 | do | |
27baa584 TP |
38 | - if test -d $PIDDIR |
39 | + if test -d $PIDDIR | |
40 | then | |
41 | break; | |
42 | fi | |
b8fc1ff3 AA |
43 | done |
44 | ||
45 | -# Find the default directory to put the apcupsd.events and apcupsd.status files | |
46 | +# Find the default directory to put the apcupsd.events file | |
47 | for LOGDIR in "/var/log" "/etc/apcupsd" | |
48 | do | |
27baa584 TP |
49 | - if test -d $LOGDIR |
50 | + if test -d $LOGDIR | |
51 | + then | |
52 | + break; | |
53 | + fi | |
b8fc1ff3 AA |
54 | +done |
55 | + | |
56 | +# Find the default directory to put the apcupsd.status file | |
c1556a3f | 57 | +for STATDIR in "/var/log" "/etc/apcupsd" "/var/lib/apcupsd" |
b8fc1ff3 | 58 | +do |
27baa584 TP |
59 | + if test -d $STATDIR |
60 | then | |
61 | break; | |
62 | fi | |
63 | @@ -1499,9 +1508,14 @@ | |
64 | ||
b8fc1ff3 AA |
65 | # now allow user to specify LOGDIR |
66 | AC_ARG_WITH(log-dir, | |
6c9d51be | 67 | - [AC_HELP_STRING([--with-log-dir=DIR], [Specify EVENTS and STATUS directory (default is OS dependent)])], |
68 | + [AC_HELP_STRING([--with-log-dir=DIR], [Specify EVENTS directory (default is OS dependent)])], | |
27baa584 TP |
69 | [LOGDIR="$withval";]) |
70 | ||
b8fc1ff3 AA |
71 | +# now allow user to specify STATDIR |
72 | +AC_ARG_WITH(stat-dir, | |
6c9d51be | 73 | + [AC_HELP_STRING([--with-stat-dir=DIR], [Specify STATUS directory (default is OS dependent)])], |
27baa584 TP |
74 | + [STATDIR="$withval";]) |
75 | + | |
b8fc1ff3 AA |
76 | # now allow user to specify LOCKDIR |
77 | AC_ARG_WITH(lock-dir, | |
27baa584 | 78 | [AC_HELP_STRING([--with-lock-dir=DIR], [Specify serial port lock directory (default is OS dependent)])], |
291cd762 | 79 | @@ -1396,6 +1396,8 @@ |
b8fc1ff3 | 80 | AC_SUBST(LOGDIR) |
291cd762 ER |
81 | AC_DEFINE_UNQUOTED(NOLOGDIR, "$nologdir", [Default directory in which nologin file is written]) |
82 | AC_SUBST(nologdir) | |
b8fc1ff3 AA |
83 | +AC_DEFINE_UNQUOTED(STATDIR, "$STATDIR") |
84 | +AC_SUBST(STATDIR) | |
291cd762 ER |
85 | AC_DEFINE_UNQUOTED(PWRFAILDIR, "$PWRFAILDIR", [Default directory in which powerfail flag file is written]) |
86 | AC_SUBST(PWRFAILDIR) | |
87 | AC_SUBST(LOCKDIR) | |
27baa584 TP |
88 | @@ -1713,7 +1729,8 @@ |
89 | Install man files: ${mandir} | |
90 | Nologin file in: ${nologdir} | |
91 | PID directory: ${PIDDIR} | |
b8fc1ff3 | 92 | - LOG dir (events, status) ${LOGDIR} |
27baa584 TP |
93 | + LOG dir (events) ${LOGDIR} |
94 | + STAT dir (status) ${STATDIR} | |
b8fc1ff3 | 95 | LOCK dir (for serial port) ${LOCKDIR} |
27baa584 TP |
96 | Power Fail dir ${PWRFAILDIR} |
97 | Compiler: ${CXX} ${CXXVERSION} | |
7c246031 JB |
98 | --- apcupsd-3.12.1/platforms/etc/apcupsd.conf.in.orig 2005-12-31 00:26:41.000000000 +0100 |
99 | +++ apcupsd-3.12.1/platforms/etc/apcupsd.conf.in 2006-01-24 13:45:20.000000000 +0100 | |
100 | @@ -227,7 +227,7 @@ | |
b8fc1ff3 | 101 | STATTIME 0 |
7c246031 | 102 | |
b8fc1ff3 AA |
103 | # Location of STATUS file (written to only if STATTIME is non-zero) |
104 | -STATFILE @LOGDIR@/apcupsd.status | |
105 | +STATFILE @STATDIR@/apcupsd.status | |
7c246031 | 106 | |
b8fc1ff3 | 107 | # LOGSTATS [ on | off ] on enables, off disables |
7c246031 | 108 | # Note! This generates a lot of output, so if |