3 # Patch managed by http://www.holgerschurig.de/patcher.html
6 --- ppp-2.4.3/pppd/ipcp.c~pppd-resolv-varrun.patch
7 +++ ppp-2.4.3/pppd/ipcp.c
9 #include <sys/socket.h>
10 #include <netinet/in.h>
11 #include <arpa/inet.h>
12 +#include <sys/stat.h>
17 @@ -2032,6 +2034,14 @@
18 u_int32_t peerdns1, peerdns2;
21 + struct stat dirinfo;
23 + if(stat(_PATH_OUTDIR, &dirinfo)) {
24 + if(mkdir(_PATH_OUTDIR, 0775)) {
25 + error("Failed to create directory %s: %m", _PATH_OUTDIR);
30 f = fopen(_PATH_RESOLV, "w");
32 --- ppp-2.4.3/pppd/pathnames.h~pppd-resolv-varrun.patch
33 +++ ppp-2.4.3/pppd/pathnames.h
35 #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options."
36 #define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors"
37 #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/"
38 -#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf"
39 +#define _PATH_OUTDIR _ROOT_PATH _PATH_VARRUN "/ppp"
40 +#define _PATH_RESOLV _PATH_OUTDIR "/resolv.conf"
42 #define _PATH_USEROPT ".ppprc"
43 #define _PATH_PSEUDONYM ".ppp_pseudonym"