]> git.pld-linux.org Git - packages/apcupsd.git/blame - apcupsd-configure.patch
- ah, fixed already on head
[packages/apcupsd.git] / apcupsd-configure.patch
CommitLineData
c1556a3f 1diff -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
27baa584 17@@ -1261,16 +1261,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
27baa584
TP
21- if test -d $PIDDIR
22+ if test -d $PIDDIR
23 then
24 break;
25 fi
b8fc1ff3
AA
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
27baa584
TP
32- if test -d $LOGDIR
33+ if test -d $LOGDIR
34+ then
35+ break;
36+ fi
b8fc1ff3
AA
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 41+do
27baa584
TP
42+ if test -d $STATDIR
43 then
44 break;
45 fi
46@@ -1499,9 +1508,14 @@
47
b8fc1ff3
AA
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)])],
27baa584
TP
52 [LOGDIR="$withval";])
53
b8fc1ff3
AA
54+# now allow user to specify STATDIR
55+AC_ARG_WITH(stat-dir,
6c9d51be 56+ [AC_HELP_STRING([--with-stat-dir=DIR], [Specify STATUS directory (default is OS dependent)])],
27baa584
TP
57+ [STATDIR="$withval";])
58+
b8fc1ff3
AA
59 # now allow user to specify LOCKDIR
60 AC_ARG_WITH(lock-dir,
27baa584
TP
61 [AC_HELP_STRING([--with-lock-dir=DIR], [Specify serial port lock directory (default is OS dependent)])],
62@@ -1543,6 +1557,8 @@
b8fc1ff3
AA
63 AC_SUBST(PIDDIR)
64 AC_DEFINE_UNQUOTED(LOGDIR, "$LOGDIR")
65 AC_SUBST(LOGDIR)
66+AC_DEFINE_UNQUOTED(STATDIR, "$STATDIR")
67+AC_SUBST(STATDIR)
68 AC_DEFINE_UNQUOTED(NOLOGDIR, "$nologdir")
69 AC_SUBST(nologdir)
70 AC_DEFINE_UNQUOTED(PWRFAILDIR, "$PWRFAILDIR")
27baa584
TP
71@@ -1713,7 +1729,8 @@
72 Install man files: ${mandir}
73 Nologin file in: ${nologdir}
74 PID directory: ${PIDDIR}
b8fc1ff3 75- LOG dir (events, status) ${LOGDIR}
27baa584
TP
76+ LOG dir (events) ${LOGDIR}
77+ STAT dir (status) ${STATDIR}
b8fc1ff3 78 LOCK dir (for serial port) ${LOCKDIR}
27baa584
TP
79 Power Fail dir ${PWRFAILDIR}
80 Compiler: ${CXX} ${CXXVERSION}
7c246031
JB
81--- apcupsd-3.12.1/platforms/etc/apcupsd.conf.in.orig 2005-12-31 00:26:41.000000000 +0100
82+++ apcupsd-3.12.1/platforms/etc/apcupsd.conf.in 2006-01-24 13:45:20.000000000 +0100
83@@ -227,7 +227,7 @@
b8fc1ff3 84 STATTIME 0
7c246031 85
b8fc1ff3
AA
86 # Location of STATUS file (written to only if STATTIME is non-zero)
87-STATFILE @LOGDIR@/apcupsd.status
88+STATFILE @STATDIR@/apcupsd.status
7c246031 89
b8fc1ff3 90 # LOGSTATS [ on | off ] on enables, off disables
7c246031 91 # Note! This generates a lot of output, so if
This page took 0.081178 seconds and 4 git commands to generate.