Honor the --localstatedir option to configure, instead of hardcoded /var.
authorIvo Timmermans <ivo@lychnis.net>
Wed, 22 Nov 2000 16:19:07 +0000 (16:19 +0000)
committerIvo Timmermans <ivo@lychnis.net>
Wed, 22 Nov 2000 16:19:07 +0000 (16:19 +0000)
src/Makefile.am
src/tincd.c

index bb83f79916da35c489ebc82036f6c98769307434..185e5a0629c2c340ed0a1aac99680edd6ddcfa0a 100644 (file)
@@ -1,5 +1,5 @@
 ## Produce this file with automake to get Makefile.in
-# $Id: Makefile.am,v 1.4.4.9 2000/11/20 19:12:11 guus Exp $
+# $Id: Makefile.am,v 1.4.4.10 2000/11/22 16:19:06 zarq Exp $
 
 sbin_PROGRAMS = tincd
 
@@ -18,5 +18,5 @@ tincd_LDADD = \
 
 localedir = $(datadir)/locale
 
-CFLAGS = @CFLAGS@ -DPKGLIBDIR=$(pkglibdir) -DCONFDIR=\"@sysconfdir@\"  \
-       -DLOCALEDIR=\"$(localedir)\"
+CFLAGS = @CFLAGS@ -DPKGLIBDIR=$(pkglibdir) -DCONFDIR=\"$(sysconfdir)\" \
+       -DLOCALEDIR=\"$(localedir)\" -DLOCALSTATEDIR=\"$(localstatedir)\"
index 7118d1f3fd4694323f203fb1bbfae5364fbce2e9..d2ce14d03fb00f0a4d566f7f8f01b47c9b5b3371 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id: tincd.c,v 1.10.4.32 2000/11/20 22:13:14 guus Exp $
+    $Id: tincd.c,v 1.10.4.33 2000/11/22 16:19:07 zarq Exp $
 */
 
 #include "config.h"
@@ -248,7 +248,7 @@ void make_names(void)
   if(netname)
     {
       if(!pidfilename)
-        asprintf(&pidfilename, "/var/run/tinc.%s.pid", netname);
+        asprintf(&pidfilename, LOCALSTATEDIR "/run/tinc.%s.pid", netname);
       if(!confbase)
         asprintf(&confbase, "%s/tinc/%s", CONFDIR, netname);
       else
@@ -259,7 +259,7 @@ void make_names(void)
   else
     {
       if(!pidfilename)
-        pidfilename = "/var/run/tinc.pid";
+        pidfilename = LOCALSTATEDIR "/run/tinc.pid";
       if(!confbase)
         asprintf(&confbase, "%s/tinc", CONFDIR);
       if(!identname)