]> git.pld-linux.org Git - packages/apcupsd.git/blob - apcupsd-configure.patch
configure scripts from well known location
[packages/apcupsd.git] / apcupsd-configure.patch
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 */
5  #undef LOGDIR
6  
7 +/* Define the default "status" files directory. */
8 +#undef STATDIR
9 +
10  /* Default port number for NIS server */
11  #undef NISPORT
12  
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
15 @@ -1261,16 +1261,25 @@
16  # Find the default directory to put the root-mode PID file in
17  for PIDDIR in "/var/run" "/etc/apcupsd"
18  do
19 -   if test -d $PIDDIR 
20 +   if test -d $PIDDIR
21     then
22        break;
23     fi
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
30 -   if test -d $LOGDIR 
31 +   if test -d $LOGDIR
32 +   then
33 +      break;
34 +   fi
35 +done
36 +
37 +# Find the default directory to put the apcupsd.status file
38 +for STATDIR in "/var/log" "/etc/apcupsd" "/var/lib/apcupsd"
39 +do
40 +   if test -d $STATDIR
41     then
42        break;
43     fi
44 @@ -1499,9 +1508,14 @@
45  
46  # now allow user to specify LOGDIR
47  AC_ARG_WITH(log-dir,
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)])],
50      [LOGDIR="$withval";])
51  
52 +# now allow user to specify STATDIR
53 +AC_ARG_WITH(stat-dir,
54 +    [AC_HELP_STRING([--with-stat-dir=DIR], [Specify STATUS directory (default is OS dependent)])],
55 +    [STATDIR="$withval";])
56 +
57  # now allow user to specify LOCKDIR
58  AC_ARG_WITH(lock-dir,
59      [AC_HELP_STRING([--with-lock-dir=DIR], [Specify serial port lock directory (default is OS dependent)])],
60 @@ -1396,6 +1396,8 @@
61  AC_SUBST(LOGDIR)
62  AC_DEFINE_UNQUOTED(NOLOGDIR, "$nologdir", [Default directory in which nologin file is written])
63  AC_SUBST(nologdir)
64 +AC_DEFINE_UNQUOTED(STATDIR, "$STATDIR")
65 +AC_SUBST(STATDIR)
66  AC_DEFINE_UNQUOTED(PWRFAILDIR, "$PWRFAILDIR", [Default directory in which powerfail flag file is written])
67  AC_SUBST(PWRFAILDIR)
68  AC_SUBST(LOCKDIR)
69 @@ -1713,7 +1729,8 @@
70    Install man files:          ${mandir}
71    Nologin file in:            ${nologdir}
72    PID directory:              ${PIDDIR}
73 -  LOG dir (events, status)    ${LOGDIR}
74 +  LOG dir (events)    ${LOGDIR}
75 +  STAT dir (status)    ${STATDIR}
76    LOCK dir (for serial port)  ${LOCKDIR}
77    Power Fail dir              ${PWRFAILDIR}
78    Compiler:                   ${CXX} ${CXXVERSION}
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 @@
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  # LOGSTATS [ on | off ] on enables, off disables
89  # Note! This generates a lot of output, so if         
This page took 0.085619 seconds and 3 git commands to generate.