1 diff -urN apcupsd-3.10.13.orig/autoconf/acconfig.h apcupsd-3.10.13.new/autoconf/acconfig.h
2 --- apcupsd-3.10.13.orig/autoconf/acconfig.h 2004-04-16 15:18:42.000000000 +0200
3 +++ apcupsd-3.10.13.new/autoconf/acconfig.h 2004-05-22 15:54:12.854409808 +0200
5 /* Define the default "log" files directory. */
8 +/* Define the default "status" files directory. */
12 /* Define the default serial port lock directory */
15 diff -urN apcupsd-3.10.13.orig/autoconf/configure.in apcupsd-3.10.13.new/autoconf/configure.in
16 --- apcupsd-3.10.13.orig/autoconf/configure.in 2004-04-16 20:14:57.000000000 +0200
17 +++ apcupsd-3.10.13.new/autoconf/configure.in 2004-05-22 19:09:30.116115272 +0200
18 @@ -1196,16 +1196,25 @@
19 # Find the default directory to put the root-mode PID file in
20 for PIDDIR in "/var/run" "/etc/apcupsd"
29 -# Find the default directory to put the apcupsd.events and apcupsd.status files
30 +# Find the default directory to put the apcupsd.events file
31 for LOGDIR in "/var/log" "/etc/apcupsd"
40 +# Find the default directory to put the apcupsd.status file
41 +for STATDIR in "/var/log" "/etc/apcupsd" "/var/lib/apcupsd"
47 @@ -1504,11 +1513,18 @@
49 # now allow user to specify LOGDIR
51 - [ --with-log-dir=DIR Specify EVENTS and STATUS directory (default is OS dependent)],
52 + [ --with-log-dir=DIR Specify EVENTS directory (default is OS dependent)],
57 +# now allow user to specify STATDIR
58 +AC_ARG_WITH(stat-dir,
59 + [ --with-stat-dir=DIR Specify STATUS directory (default is OS dependent)],
64 # now allow user to specify LOCKDIR
66 [ --with-lock-dir=DIR Specify serial port lock directory (default is OS dependent)],
69 AC_DEFINE_UNQUOTED(LOGDIR, "$LOGDIR")
71 +AC_DEFINE_UNQUOTED(STATDIR, "$STATDIR")
73 AC_DEFINE_UNQUOTED(NOLOGDIR, "$nologdir")
75 AC_DEFINE_UNQUOTED(PWRFAILDIR, "$PWRFAILDIR")
77 Install man files: ${mandir}
78 Nologin file in: ${nologdir}
79 PID directory: ${PIDDIR}
80 - LOG dir (events, status) ${LOGDIR}
81 + LOG dir (events) ${LOGDIR}
82 + STATUS dir (status) ${STATDIR}
83 LOCK dir (for serial port) ${LOCKDIR}
84 Power Fail dir ${PWRFAILDIR}
85 Compiler: ${CC} ${CCVERSION}
86 diff -urN apcupsd-3.10.13.orig/platforms/etc/apcupsd.conf.in apcupsd-3.10.13.new/platforms/etc/apcupsd.conf.in
87 --- apcupsd-3.10.13.orig/platforms/etc/apcupsd.conf.in 2003-11-26 16:54:47.000000000 +0100
88 +++ apcupsd-3.10.13.new/platforms/etc/apcupsd.conf.in 2004-05-22 19:11:36.654878456 +0200
92 # Location of STATUS file (written to only if STATTIME is non-zero)
93 -STATFILE @LOGDIR@/apcupsd.status
94 +STATFILE @STATDIR@/apcupsd.status
97 # LOGSTATS [ on | off ] on enables, off disables