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
4 /* Default directory in which log is written */
7 +/* Define the default "status" files directory. */
10 /* Default port number for NIS server */
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
15 @@ -1261,16 +1261,25 @@
16 # Find the default directory to put the root-mode PID file in
17 for PIDDIR in "/var/run" "/etc/apcupsd"
26 -# Find the default directory to put the apcupsd.events and apcupsd.status files
27 +# Find the default directory to put the apcupsd.events file
28 for LOGDIR in "/var/log" "/etc/apcupsd"
37 +# Find the default directory to put the apcupsd.status file
38 +for STATDIR in "/var/log" "/etc/apcupsd" "/var/lib/apcupsd"
44 @@ -1499,9 +1508,14 @@
46 # now allow user to specify LOGDIR
48 - [AC_HELP_STRING([--with-log-dir=DIR], [Specify EVENTS and STATUS directory (default is OS dependent)])],
49 + [AC_HELP_STRING([--with-log-dir=DIR], [Specify EVENTS directory (default is OS dependent)])],
52 +# now allow user to specify STATDIR
53 +AC_ARG_WITH(stat-dir,
54 + [AC_HELP_STRING([--with-stat-dir=DIR], [Specify STATUS directory (default is OS dependent)])],
55 + [STATDIR="$withval";])
57 # now allow user to specify LOCKDIR
59 [AC_HELP_STRING([--with-lock-dir=DIR], [Specify serial port lock directory (default is OS dependent)])],
62 AC_DEFINE_UNQUOTED(NOLOGDIR, "$nologdir", [Default directory in which nologin file is written])
64 +AC_DEFINE_UNQUOTED(STATDIR, "$STATDIR")
66 AC_DEFINE_UNQUOTED(PWRFAILDIR, "$PWRFAILDIR", [Default directory in which powerfail flag file is written])
70 Install man files: ${mandir}
71 Nologin file in: ${nologdir}
72 PID directory: ${PIDDIR}
73 - LOG dir (events, status) ${LOGDIR}
74 + LOG dir (events) ${LOGDIR}
75 + STAT dir (status) ${STATDIR}
76 LOCK dir (for serial port) ${LOCKDIR}
77 Power Fail dir ${PWRFAILDIR}
78 Compiler: ${CXX} ${CXXVERSION}
79 --- apcupsd-3.12.1/platforms/etc/apcupsd.conf.in.orig 2005-12-31 00:26:41.000000000 +0100
80 +++ apcupsd-3.12.1/platforms/etc/apcupsd.conf.in 2006-01-24 13:45:20.000000000 +0100
84 # Location of STATUS file (written to only if STATTIME is non-zero)
85 -STATFILE @LOGDIR@/apcupsd.status
86 +STATFILE @STATDIR@/apcupsd.status
88 # LOGSTATS [ on | off ] on enables, off disables
89 # Note! This generates a lot of output, so if