1 --- ppp/pppd/ipcp.c 2001-03-08 18:11:12.000000000 +1300
2 +++ ppp/pppd/ipcp.c 2005-02-06 14:10:13.055551720 +1300
4 #include <sys/socket.h>
5 #include <netinet/in.h>
12 @@ -1859,6 +1861,14 @@
13 u_int32_t peerdns1, peerdns2;
16 + struct stat dirinfo;
18 + if(stat(_PATH_OUTDIR, &dirinfo)) {
19 + if(mkdir(_PATH_OUTDIR, 0775)) {
20 + error("Failed to create directory %s: %m", _PATH_OUTDIR);
25 f = fopen(_PATH_RESOLV, "w");
27 --- ppp/pppd/pathnames.h 2001-03-08 18:15:37.000000000 +1300
28 +++ ppp/pppd/pathnames.h 2005-02-06 14:01:19.423676096 +1300
30 #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options."
31 #define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors"
32 #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/"
33 -#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf"
34 +#define _PATH_OUTDIR _ROOT_PATH _PATH_VARRUN "/ppp"
35 +#define _PATH_RESOLV _PATH_OUTDIR "/resolv.conf"
37 #define _PATH_USEROPT ".ppprc"