diff options
author | Evan Doiron <edoiron@cbnco.com> | 2009-08-26 04:18:47 +0000 |
---|---|---|
committer | Michael Smith <msmith@cbnco.com> | 2009-08-26 13:34:34 -0400 |
commit | f6c302378fdc3b1029358bfc4ebcb75082f46480 (patch) | |
tree | 96006bb63106a670ceb03f555c8b0dedc457aa05 /recipes/ppp/ppp-2.4.4/pppd-resolv-varrun.patch | |
parent | 70ddea99eedb41caf9f649c7266ddeccf7e8e875 (diff) |
ppp: add v2.4.4
Signed-off-by: Evan Doiron <edoiron@cbnco.com>
Signed-off-by: Michael Smith <msmith@cbnco.com>
Acked-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes/ppp/ppp-2.4.4/pppd-resolv-varrun.patch')
-rw-r--r-- | recipes/ppp/ppp-2.4.4/pppd-resolv-varrun.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes/ppp/ppp-2.4.4/pppd-resolv-varrun.patch b/recipes/ppp/ppp-2.4.4/pppd-resolv-varrun.patch new file mode 100644 index 0000000000..c22d8cc085 --- /dev/null +++ b/recipes/ppp/ppp-2.4.4/pppd-resolv-varrun.patch @@ -0,0 +1,43 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- ppp-2.4.3/pppd/ipcp.c~pppd-resolv-varrun.patch ++++ ppp-2.4.3/pppd/ipcp.c +@@ -55,6 +55,8 @@ + #include <sys/socket.h> + #include <netinet/in.h> + #include <arpa/inet.h> ++#include <sys/stat.h> ++#include <unistd.h> + + #include "pppd.h" + #include "fsm.h" +@@ -2032,6 +2034,14 @@ + u_int32_t peerdns1, peerdns2; + { + FILE *f; ++ struct stat dirinfo; ++ ++ if(stat(_PATH_OUTDIR, &dirinfo)) { ++ if(mkdir(_PATH_OUTDIR, 0775)) { ++ error("Failed to create directory %s: %m", _PATH_OUTDIR); ++ return; ++ } ++ } + + f = fopen(_PATH_RESOLV, "w"); + if (f == NULL) { +--- ppp-2.4.3/pppd/pathnames.h~pppd-resolv-varrun.patch ++++ ppp-2.4.3/pppd/pathnames.h +@@ -29,7 +29,8 @@ + #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_OUTDIR _ROOT_PATH _PATH_VARRUN "/ppp" ++#define _PATH_RESOLV _PATH_OUTDIR "/resolv.conf" + + #define _PATH_USEROPT ".ppprc" + #define _PATH_PSEUDONYM ".ppp_pseudonym" |