]> git.pld-linux.org Git - packages/apcupsd.git/blame - apcupsd-configure.patch
- add force-reload
[packages/apcupsd.git] / apcupsd-configure.patch
CommitLineData
b8fc1ff3
AA
1diff -urN apcupsd-3.10.12.orig/autoconf/acconfig.h apcupsd-3.10.12.new/autoconf/acconfig.h
2--- apcupsd-3.10.12.orig/autoconf/acconfig.h 2003-03-08 16:14:52.000000000 +0100
3+++ apcupsd-3.10.12.new/autoconf/acconfig.h 2004-04-08 12:40:17.892974408 +0200
4@@ -97,6 +97,9 @@
5 /* Define the default "log" files directory. */
6 #undef LOGDIR
7
8+/* Define the default "status" files directory. */
9+#undef STATDIR
10+
11 /* Define the default serial port lock directory */
12 #undef LOCKDIR
13
14diff -urN apcupsd-3.10.12.orig/autoconf/configure.in apcupsd-3.10.12.new/autoconf/configure.in
15--- apcupsd-3.10.12.orig/autoconf/configure.in 2004-03-04 11:48:42.000000000 +0100
16+++ apcupsd-3.10.12.new/autoconf/configure.in 2004-04-08 13:13:47.029539224 +0200
17@@ -1176,10 +1176,19 @@
18 fi
19 done
20
21-# Find the default directory to put the apcupsd.events and apcupsd.status files
22+# Find the default directory to put the apcupsd.events file
23 for LOGDIR in "/var/log" "/etc/apcupsd"
24 do
25- if test -d $LOGDIR
26+ if test -d $LOGDIR
27+ then
28+ break;
29+ fi
30+done
31+
32+# Find the default directory to put the apcupsd.status file
33+for STATDIR in "/var/log" "/etc/apcupsd"
34+do
35+ if test -d $STATDIR
36 then
37 break;
38 fi
39@@ -1479,11 +1488,18 @@
40 )
41 # now allow user to specify LOGDIR
42 AC_ARG_WITH(log-dir,
43- [ --with-log-dir=DIR Specify EVENTS and STATUS directory (default is OS dependent)],
44+ [ --with-log-dir=DIR Specify EVENTS directory (default is OS dependent)],
45 [
46 LOGDIR="$withval";
47 ]
48 )
49+# now allow user to specify STATDIR
50+AC_ARG_WITH(stat-dir,
51+ [ --with-stat-dir=DIR Specify STATUS directory (default is OS dependent)],
52+ [
53+ STATDIR="$withval";
54+ ]
55+)
56 # now allow user to specify LOCKDIR
57 AC_ARG_WITH(lock-dir,
58 [ --with-lock-dir=DIR Specify serial port lock directory (default is OS dependent)],
59@@ -1549,6 +1565,8 @@
60 AC_SUBST(PIDDIR)
61 AC_DEFINE_UNQUOTED(LOGDIR, "$LOGDIR")
62 AC_SUBST(LOGDIR)
63+AC_DEFINE_UNQUOTED(STATDIR, "$STATDIR")
64+AC_SUBST(STATDIR)
65 AC_DEFINE_UNQUOTED(NOLOGDIR, "$nologdir")
66 AC_SUBST(nologdir)
67 AC_DEFINE_UNQUOTED(PWRFAILDIR, "$PWRFAILDIR")
68@@ -1709,7 +1727,8 @@
69 Install man files: ${mandir}
70 Nologin file in: ${nologdir}
71 PID directory: ${PIDDIR}
72- LOG dir (events, status) ${LOGDIR}
73+ LOG dir (events) ${LOGDIR}
74+ STATUS dir (status) ${STATDIR}
75 LOCK dir (for serial port) ${LOCKDIR}
76 Power Fail dir ${PWRFAILDIR}
77 Compiler: ${CC} ${CCVERSION}
78diff -urN apcupsd-3.10.12.orig/platforms/etc/apcupsd.conf.in apcupsd-3.10.12.new/platforms/etc/apcupsd.conf.in
79--- apcupsd-3.10.12.orig/platforms/etc/apcupsd.conf.in 2003-11-26 16:54:47.000000000 +0100
80+++ apcupsd-3.10.12.new/platforms/etc/apcupsd.conf.in 2004-04-08 13:27:59.542937488 +0200
81@@ -217,7 +217,7 @@
82 STATTIME 0
83 #
84 # Location of STATUS file (written to only if STATTIME is non-zero)
85-STATFILE @LOGDIR@/apcupsd.status
86+STATFILE @STATDIR@/apcupsd.status
87 #
88 #
89 # LOGSTATS [ on | off ] on enables, off disables
This page took 0.068326 seconds and 4 git commands to generate.