]> git.pld-linux.org Git - packages/apcupsd.git/blame - apcupsd-configure.patch
- outdated
[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 15diff -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"
21 do
22- if test -d $PIDDIR
23+ if test -d $PIDDIR
24 then
25 break;
b8fc1ff3
AA
26 fi
27 done
28
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"
32 do
33- if test -d $LOGDIR
34+ if test -d $LOGDIR
35+ then
36+ break;
37+ fi
38+done
39+
40+# Find the default directory to put the apcupsd.status file
c1556a3f 41+for STATDIR in "/var/log" "/etc/apcupsd" "/var/lib/apcupsd"
b8fc1ff3
AA
42+do
43+ if test -d $STATDIR
44 then
45 break;
46 fi
c1556a3f 47@@ -1504,11 +1513,18 @@
b8fc1ff3
AA
48 )
49 # now allow user to specify LOGDIR
50 AC_ARG_WITH(log-dir,
c1556a3f 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)],
53 [
54 LOGDIR="$withval";
55 ]
b8fc1ff3
AA
56 )
57+# now allow user to specify STATDIR
58+AC_ARG_WITH(stat-dir,
c1556a3f 59+ [ --with-stat-dir=DIR Specify STATUS directory (default is OS dependent)],
60+ [
61+ STATDIR="$withval";
62+ ]
b8fc1ff3
AA
63+)
64 # now allow user to specify LOCKDIR
65 AC_ARG_WITH(lock-dir,
c1556a3f 66 [ --with-lock-dir=DIR Specify serial port lock directory (default is OS dependent)],
67@@ -1582,6 +1598,8 @@
b8fc1ff3
AA
68 AC_SUBST(PIDDIR)
69 AC_DEFINE_UNQUOTED(LOGDIR, "$LOGDIR")
70 AC_SUBST(LOGDIR)
71+AC_DEFINE_UNQUOTED(STATDIR, "$STATDIR")
72+AC_SUBST(STATDIR)
73 AC_DEFINE_UNQUOTED(NOLOGDIR, "$nologdir")
74 AC_SUBST(nologdir)
75 AC_DEFINE_UNQUOTED(PWRFAILDIR, "$PWRFAILDIR")
c1556a3f 76@@ -1742,7 +1760,8 @@
b8fc1ff3
AA
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}
c1556a3f 86diff -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
b8fc1ff3
AA
89@@ -217,7 +217,7 @@
90 STATTIME 0
91 #
92 # Location of STATUS file (written to only if STATTIME is non-zero)
93-STATFILE @LOGDIR@/apcupsd.status
94+STATFILE @STATDIR@/apcupsd.status
95 #
96 #
97 # LOGSTATS [ on | off ] on enables, off disables
This page took 0.071016 seconds and 4 git commands to generate.