]> git.pld-linux.org Git - packages/apcupsd.git/blame - apcupsd-configure.patch
up to 3.14.13
[packages/apcupsd.git] / apcupsd-configure.patch
CommitLineData
291cd762
ER
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
3@@ -295,6 +295,9 @@
4 /* Default directory in which log is written */
b8fc1ff3
AA
5 #undef LOGDIR
6
7+/* Define the default "status" files directory. */
8+#undef STATDIR
c1556a3f 9+
291cd762
ER
10 /* Default port number for NIS server */
11 #undef NISPORT
b8fc1ff3 12
291cd762
ER
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
27baa584 15@@ -1261,16 +1261,25 @@
c1556a3f 16 # Find the default directory to put the root-mode PID file in
17 for PIDDIR in "/var/run" "/etc/apcupsd"
18 do
27baa584
TP
19- if test -d $PIDDIR
20+ if test -d $PIDDIR
21 then
22 break;
23 fi
b8fc1ff3
AA
24 done
25
26-# Find the default directory to put the apcupsd.events and apcupsd.status files
27+# Find the default directory to put the apcupsd.events file
28 for LOGDIR in "/var/log" "/etc/apcupsd"
29 do
27baa584
TP
30- if test -d $LOGDIR
31+ if test -d $LOGDIR
32+ then
33+ break;
34+ fi
b8fc1ff3
AA
35+done
36+
37+# Find the default directory to put the apcupsd.status file
c1556a3f 38+for STATDIR in "/var/log" "/etc/apcupsd" "/var/lib/apcupsd"
b8fc1ff3 39+do
27baa584
TP
40+ if test -d $STATDIR
41 then
42 break;
43 fi
44@@ -1499,9 +1508,14 @@
45
b8fc1ff3
AA
46 # now allow user to specify LOGDIR
47 AC_ARG_WITH(log-dir,
6c9d51be 48- [AC_HELP_STRING([--with-log-dir=DIR], [Specify EVENTS and STATUS directory (default is OS dependent)])],
49+ [AC_HELP_STRING([--with-log-dir=DIR], [Specify EVENTS directory (default is OS dependent)])],
27baa584
TP
50 [LOGDIR="$withval";])
51
b8fc1ff3
AA
52+# now allow user to specify STATDIR
53+AC_ARG_WITH(stat-dir,
6c9d51be 54+ [AC_HELP_STRING([--with-stat-dir=DIR], [Specify STATUS directory (default is OS dependent)])],
27baa584
TP
55+ [STATDIR="$withval";])
56+
b8fc1ff3
AA
57 # now allow user to specify LOCKDIR
58 AC_ARG_WITH(lock-dir,
27baa584 59 [AC_HELP_STRING([--with-lock-dir=DIR], [Specify serial port lock directory (default is OS dependent)])],
291cd762 60@@ -1396,6 +1396,8 @@
b8fc1ff3 61 AC_SUBST(LOGDIR)
291cd762
ER
62 AC_DEFINE_UNQUOTED(NOLOGDIR, "$nologdir", [Default directory in which nologin file is written])
63 AC_SUBST(nologdir)
b8fc1ff3
AA
64+AC_DEFINE_UNQUOTED(STATDIR, "$STATDIR")
65+AC_SUBST(STATDIR)
291cd762
ER
66 AC_DEFINE_UNQUOTED(PWRFAILDIR, "$PWRFAILDIR", [Default directory in which powerfail flag file is written])
67 AC_SUBST(PWRFAILDIR)
68 AC_SUBST(LOCKDIR)
27baa584
TP
69@@ -1713,7 +1729,8 @@
70 Install man files: ${mandir}
71 Nologin file in: ${nologdir}
72 PID directory: ${PIDDIR}
b8fc1ff3 73- LOG dir (events, status) ${LOGDIR}
27baa584
TP
74+ LOG dir (events) ${LOGDIR}
75+ STAT dir (status) ${STATDIR}
b8fc1ff3 76 LOCK dir (for serial port) ${LOCKDIR}
27baa584
TP
77 Power Fail dir ${PWRFAILDIR}
78 Compiler: ${CXX} ${CXXVERSION}
7c246031
JB
79--- apcupsd-3.12.1/platforms/etc/apcupsd.conf.in.orig 2005-12-31 00:26:41.000000000 +0100
80+++ apcupsd-3.12.1/platforms/etc/apcupsd.conf.in 2006-01-24 13:45:20.000000000 +0100
81@@ -227,7 +227,7 @@
b8fc1ff3 82 STATTIME 0
7c246031 83
b8fc1ff3
AA
84 # Location of STATUS file (written to only if STATTIME is non-zero)
85-STATFILE @LOGDIR@/apcupsd.status
86+STATFILE @STATDIR@/apcupsd.status
7c246031 87
b8fc1ff3 88 # LOGSTATS [ on | off ] on enables, off disables
7c246031 89 # Note! This generates a lot of output, so if
This page took 0.075055 seconds and 4 git commands to generate.