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 @@ -14,7 +14,7 @@ dnl Config header file.
16 AC_CONFIG_HEADER(include/apcconfig.h:autoconf/config.h.in)
19 -AC_CONFIG_AUX_DIR(${topdir}/autoconf)
20 +AC_CONFIG_AUX_DIR([autoconf])
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).
28 -if test -n "$ac_aux_dir"; then
29 - MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
31 if test x$MKINSTALLDIRS = x ; then
32 MKINSTALLDIRS="\$(topdir)/autoconf/mkinstalldirs"
34 @@ -1261,16 +1261,25 @@
35 # Find the default directory to put the root-mode PID file in
36 for PIDDIR in "/var/run" "/etc/apcupsd"
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"
56 +# Find the default directory to put the apcupsd.status file
57 +for STATDIR in "/var/log" "/etc/apcupsd" "/var/lib/apcupsd"
63 @@ -1499,9 +1508,14 @@
65 # now allow user to specify LOGDIR
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)])],
71 +# now allow user to specify STATDIR
72 +AC_ARG_WITH(stat-dir,
73 + [AC_HELP_STRING([--with-stat-dir=DIR], [Specify STATUS directory (default is OS dependent)])],
74 + [STATDIR="$withval";])
76 # now allow user to specify LOCKDIR
78 [AC_HELP_STRING([--with-lock-dir=DIR], [Specify serial port lock directory (default is OS dependent)])],
81 AC_DEFINE_UNQUOTED(NOLOGDIR, "$nologdir", [Default directory in which nologin file is written])
83 +AC_DEFINE_UNQUOTED(STATDIR, "$STATDIR")
85 AC_DEFINE_UNQUOTED(PWRFAILDIR, "$PWRFAILDIR", [Default directory in which powerfail flag file is written])
89 Install man files: ${mandir}
90 Nologin file in: ${nologdir}
91 PID directory: ${PIDDIR}
92 - LOG dir (events, status) ${LOGDIR}
93 + LOG dir (events) ${LOGDIR}
94 + STAT dir (status) ${STATDIR}
95 LOCK dir (for serial port) ${LOCKDIR}
96 Power Fail dir ${PWRFAILDIR}
97 Compiler: ${CXX} ${CXXVERSION}
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
103 # Location of STATUS file (written to only if STATTIME is non-zero)
104 -STATFILE @LOGDIR@/apcupsd.status
105 +STATFILE @STATDIR@/apcupsd.status
107 # LOGSTATS [ on | off ] on enables, off disables
108 # Note! This generates a lot of output, so if