d2e1ce4
From b4ef433be936c90e356da7a590b032cdee219a3f Mon Sep 17 00:00:00 2001
d2e1ce4
From: Michal Sekletar <msekleta@redhat.com>
d2e1ce4
Date: Fri, 4 Apr 2014 19:06:05 +0200
d2e1ce4
Subject: [PATCH 11/27] build-sys: don't put connect-errors log to /etc/ppp/
d2e1ce4
d2e1ce4
Resolves: #118837
d2e1ce4
---
d2e1ce4
 chat/chat.8        | 2 +-
d2e1ce4
 linux/Makefile.top | 8 +++++++-
d2e1ce4
 pppd/pathnames.h   | 4 ++--
d2e1ce4
 3 files changed, 10 insertions(+), 4 deletions(-)
d2e1ce4
d2e1ce4
diff --git a/chat/chat.8 b/chat/chat.8
d2e1ce4
index 6d10836..78d6939 100644
d2e1ce4
--- a/chat/chat.8
d2e1ce4
+++ b/chat/chat.8
d2e1ce4
@@ -200,7 +200,7 @@ The \fBSAY\fR directive allows the script to send strings to the user
d2e1ce4
 at the terminal via standard error.  If \fBchat\fR is being run by
d2e1ce4
 pppd, and pppd is running as a daemon (detached from its controlling
d2e1ce4
 terminal), standard error will normally be redirected to the file
d2e1ce4
-/etc/ppp/connect\-errors.
d2e1ce4
+/var/log/ppp/connect\-errors.
d2e1ce4
 .LP
d2e1ce4
 \fBSAY\fR strings must be enclosed in single or double quotes. If
d2e1ce4
 carriage return and line feed are needed in the string to be output,
d2e1ce4
diff --git a/linux/Makefile.top b/linux/Makefile.top
d2e1ce4
index f63d45e..f42efd5 100644
d2e1ce4
--- a/linux/Makefile.top
d2e1ce4
+++ b/linux/Makefile.top
d2e1ce4
@@ -5,6 +5,8 @@ BINDIR = $(DESTDIR)/sbin
d2e1ce4
 INCDIR = $(DESTDIR)/include
d2e1ce4
 MANDIR = $(DESTDIR)/share/man
d2e1ce4
 ETCDIR = $(INSTROOT)@SYSCONF@/ppp
d2e1ce4
+RUNDIR = $(DESTDIR)/var/run/ppp
d2e1ce4
+LOGDIR = $(DESTDIR)/var/log/ppp
d2e1ce4
 
d2e1ce4
 # uid 0 = root
d2e1ce4
 INSTALL= install
d2e1ce4
@@ -16,7 +18,7 @@ all:
d2e1ce4
 	cd pppstats; $(MAKE) $(MFLAGS) all
d2e1ce4
 	cd pppdump; $(MAKE) $(MFLAGS) all
d2e1ce4
 
d2e1ce4
-install: $(BINDIR) $(MANDIR)/man8 install-progs install-devel
d2e1ce4
+install: $(BINDIR) $(RUNDIR) $(LOGDIR) $(MANDIR)/man8 install-progs install-devel
d2e1ce4
 
d2e1ce4
 install-progs:
d2e1ce4
 	cd chat; $(MAKE) $(MFLAGS) install
d2e1ce4
@@ -44,6 +46,10 @@ $(MANDIR)/man8:
d2e1ce4
 	$(INSTALL) -d -m 755 $@
d2e1ce4
 $(ETCDIR):
d2e1ce4
 	$(INSTALL) -d -m 755 $@
d2e1ce4
+$(RUNDIR):
d2e1ce4
+	$(INSTALL) -d -m 755 $@
d2e1ce4
+$(LOGDIR):
d2e1ce4
+	$(INSTALL) -d -m 755 $@
d2e1ce4
 
d2e1ce4
 clean:
d2e1ce4
 	rm -f `find . -name '*.[oas]' -print`
d2e1ce4
diff --git a/pppd/pathnames.h b/pppd/pathnames.h
d2e1ce4
index a427cb8..bef3160 100644
d2e1ce4
--- a/pppd/pathnames.h
d2e1ce4
+++ b/pppd/pathnames.h
d2e1ce4
@@ -28,9 +28,9 @@
d2e1ce4
 #define _PATH_AUTHUP	 _ROOT_PATH "/etc/ppp/auth-up"
d2e1ce4
 #define _PATH_AUTHDOWN	 _ROOT_PATH "/etc/ppp/auth-down"
d2e1ce4
 #define _PATH_TTYOPT	 _ROOT_PATH "/etc/ppp/options."
d2e1ce4
-#define _PATH_CONNERRS	 _ROOT_PATH "/etc/ppp/connect-errors"
d2e1ce4
+#define _PATH_CONNERRS	 _ROOT_PATH "/var/log/ppp/connect-errors"
d2e1ce4
 #define _PATH_PEERFILES	 _ROOT_PATH "/etc/ppp/peers/"
d2e1ce4
-#define _PATH_RESOLV	 _ROOT_PATH "/etc/ppp/resolv.conf"
d2e1ce4
+#define _PATH_RESOLV	 _ROOT_PATH "/var/run/ppp/resolv.conf"
d2e1ce4
 
d2e1ce4
 #define _PATH_USEROPT	 ".ppprc"
d2e1ce4
 #define	_PATH_PSEUDONYM	 ".ppp_pseudonym"
d2e1ce4
-- 
d2e1ce4
1.8.3.1
d2e1ce4