]> git.ozlabs.org Git - ppp.git/commitdiff
Allow compile-time flags definitions to define the root path of config files
authorAdi Masputra <adi.masputra@sun.com>
Fri, 19 Nov 1999 09:46:08 +0000 (09:46 +0000)
committerAdi Masputra <adi.masputra@sun.com>
Fri, 19 Nov 1999 09:46:08 +0000 (09:46 +0000)
and also the location of /var/run. If no definitions found, then the
defaults will take place (unchanged as previously done). To change it,
define _ROOT_PATH (prefix of /etc/ppp) and _PATH_VARRUN (location of /var/run)
on the compiler options.

pppd/pathnames.h

index 3a096cbde6813c3519d4e5a30512df437e607c1f..4aaba6e490547e750f789cc9373a51c845bdef05 100644 (file)
@@ -1,36 +1,43 @@
 /*
  * define path names
  *
 /*
  * define path names
  *
- * $Id: pathnames.h,v 1.11 1999/08/13 01:58:05 paulus Exp $
+ * $Id: pathnames.h,v 1.12 1999/11/19 09:46:08 masputra Exp $
  */
 
 #ifdef HAVE_PATHS_H
 #include <paths.h>
 
 #else
  */
 
 #ifdef HAVE_PATHS_H
 #include <paths.h>
 
 #else
+#ifndef _PATH_VARRUN
 #define _PATH_VARRUN   "/etc/ppp/"
 #define _PATH_VARRUN   "/etc/ppp/"
+#endif
 #define _PATH_DEVNULL  "/dev/null"
 #endif
 
 #define _PATH_DEVNULL  "/dev/null"
 #endif
 
-#define _PATH_UPAPFILE         "/etc/ppp/pap-secrets"
-#define _PATH_CHAPFILE         "/etc/ppp/chap-secrets"
-#define _PATH_SYSOPTIONS "/etc/ppp/options"
-#define _PATH_IPUP     "/etc/ppp/ip-up"
-#define _PATH_IPDOWN   "/etc/ppp/ip-down"
-#define _PATH_AUTHUP   "/etc/ppp/auth-up"
-#define _PATH_AUTHDOWN "/etc/ppp/auth-down"
-#define _PATH_TTYOPT   "/etc/ppp/options."
-#define _PATH_CONNERRS "/etc/ppp/connect-errors"
-#define _PATH_USEROPT  ".ppprc"
-#define _PATH_PEERFILES        "/etc/ppp/peers/"
-#define _PATH_RESOLV   "/etc/ppp/resolv.conf"
+#ifndef _ROOT_PATH
+#define _ROOT_PATH
+#endif
+
+#define _PATH_UPAPFILE          _ROOT_PATH "/etc/ppp/pap-secrets"
+#define _PATH_CHAPFILE          _ROOT_PATH "/etc/ppp/chap-secrets"
+#define _PATH_SYSOPTIONS _ROOT_PATH "/etc/ppp/options"
+#define _PATH_IPUP      _ROOT_PATH "/etc/ppp/ip-up"
+#define _PATH_IPDOWN    _ROOT_PATH "/etc/ppp/ip-down"
+#define _PATH_AUTHUP    _ROOT_PATH "/etc/ppp/auth-up"
+#define _PATH_AUTHDOWN  _ROOT_PATH "/etc/ppp/auth-down"
+#define _PATH_TTYOPT    _ROOT_PATH "/etc/ppp/options."
+#define _PATH_CONNERRS  _ROOT_PATH "/etc/ppp/connect-errors"
+#define _PATH_PEERFILES         _ROOT_PATH "/etc/ppp/peers/"
+#define _PATH_RESOLV    _ROOT_PATH "/etc/ppp/resolv.conf"
+
+#define _PATH_USEROPT   ".ppprc"
 
 #ifdef INET6
 
 #ifdef INET6
-#define _PATH_IPV6UP     "/etc/ppp/ipv6-up"
-#define _PATH_IPV6DOWN   "/etc/ppp/ipv6-down"
+#define _PATH_IPV6UP     _ROOT_PATH "/etc/ppp/ipv6-up"
+#define _PATH_IPV6DOWN   _ROOT_PATH "/etc/ppp/ipv6-down"
 #endif
 
 #ifdef IPX_CHANGE
 #endif
 
 #ifdef IPX_CHANGE
-#define _PATH_IPXUP    "/etc/ppp/ipx-up"
-#define _PATH_IPXDOWN  "/etc/ppp/ipx-down"
+#define _PATH_IPXUP     _ROOT_PATH "/etc/ppp/ipx-up"
+#define _PATH_IPXDOWN   _ROOT_PATH "/etc/ppp/ipx-down"
 #endif /* IPX_CHANGE */
 #endif /* IPX_CHANGE */