]>
Commit | Line | Data |
---|---|---|
c1556a3f | 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 | |
4 | @@ -97,6 +97,10 @@ | |
b8fc1ff3 AA |
5 | /* Define the default "log" files directory. */ |
6 | #undef LOGDIR | |
7 | ||
8 | +/* Define the default "status" files directory. */ | |
9 | +#undef STATDIR | |
c1556a3f | 10 | + |
b8fc1ff3 AA |
11 | + |
12 | /* Define the default serial port lock directory */ | |
13 | #undef LOCKDIR | |
14 | ||
c1556a3f | 15 | --- apcupsd-3.10.13.orig/autoconf/configure.in 2004-04-16 20:14:57.000000000 +0200 |
16 | +++ apcupsd-3.10.13.new/autoconf/configure.in 2004-05-22 19:09:30.116115272 +0200 | |
6c9d51be | 17 | @@ -1188,16 +1188,25 @@ |
c1556a3f | 18 | # Find the default directory to put the root-mode PID file in |
19 | for PIDDIR in "/var/run" "/etc/apcupsd" | |
20 | do | |
21 | - if test -d $PIDDIR | |
22 | + if test -d $PIDDIR | |
23 | then | |
24 | break; | |
b8fc1ff3 AA |
25 | fi |
26 | done | |
27 | ||
28 | -# Find the default directory to put the apcupsd.events and apcupsd.status files | |
29 | +# Find the default directory to put the apcupsd.events file | |
30 | for LOGDIR in "/var/log" "/etc/apcupsd" | |
31 | do | |
32 | - if test -d $LOGDIR | |
33 | + if test -d $LOGDIR | |
34 | + then | |
35 | + break; | |
36 | + fi | |
37 | +done | |
38 | + | |
39 | +# Find the default directory to put the apcupsd.status file | |
c1556a3f | 40 | +for STATDIR in "/var/log" "/etc/apcupsd" "/var/lib/apcupsd" |
b8fc1ff3 AA |
41 | +do |
42 | + if test -d $STATDIR | |
43 | then | |
44 | break; | |
45 | fi | |
6c9d51be | 46 | @@ -1497,11 +1506,18 @@ |
b8fc1ff3 AA |
47 | ) |
48 | # now allow user to specify LOGDIR | |
49 | AC_ARG_WITH(log-dir, | |
6c9d51be | 50 | - [AC_HELP_STRING([--with-log-dir=DIR], [Specify EVENTS and STATUS directory (default is OS dependent)])], |
51 | + [AC_HELP_STRING([--with-log-dir=DIR], [Specify EVENTS directory (default is OS dependent)])], | |
c1556a3f | 52 | [ |
53 | LOGDIR="$withval"; | |
54 | ] | |
b8fc1ff3 AA |
55 | ) |
56 | +# now allow user to specify STATDIR | |
57 | +AC_ARG_WITH(stat-dir, | |
6c9d51be | 58 | + [AC_HELP_STRING([--with-stat-dir=DIR], [Specify STATUS directory (default is OS dependent)])], |
c1556a3f | 59 | + [ |
60 | + STATDIR="$withval"; | |
61 | + ] | |
b8fc1ff3 AA |
62 | +) |
63 | # now allow user to specify LOCKDIR | |
64 | AC_ARG_WITH(lock-dir, | |
c1556a3f | 65 | [ --with-lock-dir=DIR Specify serial port lock directory (default is OS dependent)], |
6c9d51be | 66 | @@ -1575,6 +1591,8 @@ |
b8fc1ff3 AA |
67 | AC_SUBST(PIDDIR) |
68 | AC_DEFINE_UNQUOTED(LOGDIR, "$LOGDIR") | |
69 | AC_SUBST(LOGDIR) | |
70 | +AC_DEFINE_UNQUOTED(STATDIR, "$STATDIR") | |
71 | +AC_SUBST(STATDIR) | |
72 | AC_DEFINE_UNQUOTED(NOLOGDIR, "$nologdir") | |
73 | AC_SUBST(nologdir) | |
74 | AC_DEFINE_UNQUOTED(PWRFAILDIR, "$PWRFAILDIR") | |
6c9d51be | 75 | @@ -1735,7 +1753,8 @@ |
b8fc1ff3 AA |
76 | Install man files: ${mandir} |
77 | Nologin file in: ${nologdir} | |
78 | PID directory: ${PIDDIR} | |
79 | - LOG dir (events, status) ${LOGDIR} | |
80 | + LOG dir (events) ${LOGDIR} | |
81 | + STATUS dir (status) ${STATDIR} | |
82 | LOCK dir (for serial port) ${LOCKDIR} | |
83 | Power Fail dir ${PWRFAILDIR} | |
84 | Compiler: ${CC} ${CCVERSION} | |
c1556a3f | 85 | --- apcupsd-3.10.13.orig/platforms/etc/apcupsd.conf.in 2003-11-26 16:54:47.000000000 +0100 |
86 | +++ apcupsd-3.10.13.new/platforms/etc/apcupsd.conf.in 2004-05-22 19:11:36.654878456 +0200 | |
b8fc1ff3 AA |
87 | @@ -217,7 +217,7 @@ |
88 | STATTIME 0 | |
89 | # | |
90 | # Location of STATUS file (written to only if STATTIME is non-zero) | |
91 | -STATFILE @LOGDIR@/apcupsd.status | |
92 | +STATFILE @STATDIR@/apcupsd.status | |
93 | # | |
94 | # | |
95 | # LOGSTATS [ on | off ] on enables, off disables |